Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Parameter formula Help fo XI Post Reply Post New Topic
Author Message
SuzyQ4021
Newbie
Newbie
Avatar

Joined: 17 Jan 2008
Location: United States
Online Status: Offline
Posts: 3
Quote SuzyQ4021 Replybullet Topic: Parameter formula Help fo XI
     Posted: 17 Jan 2008 at 10:59am
Hi,  I don't know if I can explain this right, but here I go....
 
I need a formula or maybe SQL that will help me.  I have a parameter set up for Code which can contain multiple values.  I need the code NAT_000 to populate automatically unless a different code is given.  Below is an example of my report.

Day       Advertiser    Code         Time
Monday    Pizza        Nat_000      1:00
Monday    Pizza        CNTY         1:00
Monday    KFC          NAT_000      1:10
Monday    KFC          LOCAL        1:10
Monday    KFC          CNTY         1:10
Monday    Grocery      NAT_000      1:10

If the user enters the parameter of CNTY, I need the report to look like this.  

Day       Advertiser    Code         Time
Monday    Pizza        CNTY         1:00
Monday    KFC          CNTY         1:10
Monday    Grocery      NAT_000      1:10

If the user enter the value of the paramaeter CNTY and LOCAL, if need the report to look like this.

Day       Advertiser    Code         Time
Monday    Pizza        CNTY         1:00
Monday    KFC          LOCAL        1:10
Monday    KFC          CNTY         1:10
Monday    Grocery      NAT_000      1:10
 
Any help would be greatly appreciated!  If you need more info, please let me know.  Thank you!!!!
Suzy
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 18 Jan 2008 at 5:27am
This is simply a matter of putting an OR condition in your select criteria.  So, your criteria might look like:

({MyReport.Code} IN ?SelectCode)
OR
({MyReport.Code} = 'NAT_000')




IP IP Logged
SuzyQ4021
Newbie
Newbie
Avatar

Joined: 17 Jan 2008
Location: United States
Online Status: Offline
Posts: 3
Quote SuzyQ4021 Replybullet Posted: 18 Jan 2008 at 1:47pm

That worked great!  I knew it was something simple, but just couldn't think of.  Thank you!

Suzy
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