I am trying to generate a sales report for a given date in the crystal report. In my table i have a billdate and other information. Now what i am trying to do is to get all the sales into my report when i specify a date. I have set a parameter {?dailysale}. But the selection formula {bill.BillDate} = {?dailysale} gives me a error saying {?dailysale} has to be a string, (I have set the parameter to a date). But in the report when i give something like {bill.BillDate} = "2012-08-20". It works fine.

use selection formula option of crystal reports , and set your criteria.


Try setting the parameter as DateTime datatype. If this does not work, delete the parameter and re-create it. Hope this helps.

Thanx for your inputs M. Waqas Aslam ans afbenaza. Thing is i did use use selection formula that is when i had the above mentioned error. Tried datetime too, did not work. But yeah, i did figure it out, although my method is quite a FIX rather than a right way of doing it. I set the parameter as a string, then convert the date format to the format my database saves it in and then get the required info from the table.