Link to home
Start Free TrialLog in
Avatar of Dan560
Dan560Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Crystal Reports Date in Parameter

Hi,

I am trying to create a running parameter that will utilise the "is in period"

When a user runs the report I want them to be able select from a drop down menu the options listed in the picture attached.

Can anyone explain how to set the parameter up?

Thanks
example.png
Avatar of GJParker
GJParker
Flag of United Kingdom of Great Britain and Northern Ireland image

You would need to type each value into a parameter and handle the results from this paramter in the record selection formula i.e.

If {?Param} = 'Last7Days' Then
  {table.date} >= Today - 7 and {table.date} <= Today
Else If {?Param} = 'MonthToDate' Then
  {table.date} > Today - Day(Today) and {table.date} <= Today
Else If .........etc.

HTH
ASKER CERTIFIED SOLUTION
Avatar of GJParker
GJParker
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dan560

ASKER

Thanks