Search code examples
crystal-reportscrystal-reports-2010crystal-reports-xi

Error while putting select expert condition


NEED SOME HELP WITH CRYSTAL REPORT. I was able to use the formula in select exert in one of my reports but the same formula is not working in another report.

All the fields are available in the new report also but it gives me an error " The formula cannot be used because it must be evaluated later".

My goal is just to make sure that the input date range is not more than 32 days. If there is another way to achieve please guide me.

Can anyone please help me.

The formula is

 {@date difference} <= 32 and
 currentdate - {@Start Date} <=60 and
 {Command.DATE_TRANSACTION} = {?Date} 

More details :

@date is my parameter.
@start date is formula minimum(@dtransate)
@End date is formula maximum(@transdate)
@date difference is formula DateDiff("d",{@Start Date} , {@End Date})+1

Solution

  • It worked by making two parameters as start date & end date in the record selection formula:

    {Command.DATE_TRANSACTION} >= {?Start_Date}
    {Command.DATE_TRANSACTION} <= {?End_Date}