Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Prompt for Dates >60 days old 1

Status
Not open for further replies.

BettyBoop1689

Technical User
Jun 17, 2011
1
US
How do I create a parameter to prompt for dates in my report that are >=60 days old, >=90 days old, when the user opens the report in Crytal Reports?

Also what is the formula to display dates older that 60 days, 90 days? (Using Crystal 2008)

Thanks so much ahead of time.
 

Create a string parameter and type in these values:

Older than 30 Days
Older than 60 Days
Older than 90 Days

Set "Allow Custom Values' to false


Now in your selection formula enter this:

if {?YourParameter} = "Older than 30 Days" then {YourDateField} < currentdate - 30
else
if {?YourParameter} = "Older than 60 Days" then {YourDateField} < currentdate - 60
else
if {?YourParameter} = "Older than 90 Days" then {YourDateField} < currentdate - 90


Alternatively, you could create a numeric parameter to ask for a specific number of days. Don't type in any values, and leave "Allow Custom Values" as true.

Then your selection formula would be:

{YourDateField} < currentdate - {?YourParameter}


That way the user could type in any number and get only records older than that.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top