Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Can I use a Formula in a Parameter field? Post Reply Post New Topic
Author Message
flanman
Senior Member
Senior Member
Avatar

Joined: 04 Nov 2009
Online Status: Offline
Posts: 123
Quote flanman Replybullet Topic: Can I use a Formula in a Parameter field?
    Posted: 30 Mar 2010 at 7:04am
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


IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Mar 2010 at 7:13am
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
IP IP Logged
flanman
Senior Member
Senior Member
Avatar

Joined: 04 Nov 2009
Online Status: Offline
Posts: 123
Quote flanman Replybullet Posted: 30 Mar 2010 at 8:36am
Once again great help from great people.

Thanks,

Flanman
IP IP Logged
User_dp123
Newbie
Newbie


Joined: 21 Jul 2018
Location: United States
Online Status: Offline
Posts: 1
Quote User_dp123 Replybullet Posted: 02 Aug 2018 at 11:43am
Still helpful 8 years later!
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.