Can I use a Formula in a Parameter field?

Printed From: Crystal Reports Book — Forum Name: Technical Questions

I was asked to create two reports that group info by certain weekdays. Instead of creating two separate reports my plan is to create one report and prompt the user for which group they want to view.
One group is Tue-Thur. The second is Fri-Sat. They want to look at this data separately. So I create two simple formula like this:
Formula1 DayOfWeek({FixedSites2009.Date}) in [3,4,5] and
Formula2 DayOfWeek({FixedSites2009.Date}) in [6,7]

So can I create a parameter or some type of select statement that prompts the user when they launch the report to choose one or the other?

Flanman


You cannot use a formula to define a dynamic param but you can create a param that you just add the strings of 'Tu-Th' and 'Fr-Sa' then in your select expert:
({?Param}='Tu-Th' and DayOfWeek({FixedSites2009.Date}) in [3,4,5])
or
({?Param}='Fr-Sa' and DayOfWeek({FixedSites2009.Date}) in [6,7])


Edited by DBlank - 30 Mar 2010 at 7:14am
Once again great help from great people.

Thanks,

Flanman
Still helpful 8 years later!