Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: parameter field Post Reply Post New Topic
Author Message
joekanan
Newbie
Newbie
Avatar

Joined: 22 Aug 2011
Online Status: Offline
Posts: 9
Quote joekanan Replybullet Topic: parameter field
     Posted: 22 Aug 2011 at 4:41pm
Dear all,

If we were create a report with a parameter field, and we preview the report. The report will ask the value of the parameter field so the report will show based those parameter field. My Question is could we make a condition like if the parameter were not filled so the report will ignore the parameter and running another parameter?

Thanks,


Joe
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 23 Aug 2011 at 3:08am
if you have multiple parameters the easiest way to do that is to use an or statment
i add ALL to the parameter defaults
in the record selection
if {@par1}='ALL' then true else {field}={@par1}
OR
if {@par2}='ALL' then true else {field}={@par2}
if you leave the par1 to default to all and select just par2 you should get your results
sharona
IP IP Logged
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