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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display optional Date Range Parameter

Status
Not open for further replies.

kezdawg

Programmer
Apr 2, 2008
19
GB
If you using crystal 12 you can do optional prompts and date ranges, however you may have a problem using min and max function when its optional. Here is my solution so you can display the date range on your report:


if not hasvalue ({?start date}) then "No Date Range Selected" else



if HasLowerBound ({?start date}) and HasUpperBound ({?start date}) then

"Date Range:" + ToText(Minimum({?start date}),"dd-MMM-yyyy") + " to " +

ToText(Maximum({?start date}),"dd-MMM-yyyy")

Else if HasLowerBound ({?start date}) then

"Date Range: After " + ToText(Minimum({?start date}),"dd-MMM-yyyy")

else "Date Range: Before " + ToText(Maximum({?start date}),"dd-MMM-yyyy")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top