Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal Commands based on selection Post Reply Post New Topic
Author Message
sa-user
Groupie
Groupie


Joined: 29 Jun 2011
Online Status: Offline
Posts: 65
Quote sa-user Replybullet Topic: Crystal Commands based on selection
     Posted: 11 Aug 2011 at 1:37am
I have 2 commands and 4 parameters.
In the search screen i am looking for a drop down option like below

Report Type:
 
    Product
    Product Family

If the first is selected (ie product) i want the parameters to work on 1st command
if the second is selected (ie product family) i want the parameters to work on 2nd command

The below does not seem to be working

If {parameter}=" Report Type Product" then Command1.field= {parameter} else
if {parameter}= " Product Family" then Command2.fiedl= {parameter}

Is this possible at all, or am i missing something?
 
Thanks
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: 11 Aug 2011 at 2:19am
try OR instead of else
sharona
IP IP Logged
sa-user
Groupie
Groupie


Joined: 29 Jun 2011
Online Status: Offline
Posts: 65
Quote sa-user Replybullet Posted: 11 Aug 2011 at 3:53am
OR does not work either.
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: 11 Aug 2011 at 5:45am
is it not retrieving data? try one at a time
sharona
IP IP Logged
sa-user
Groupie
Groupie


Joined: 29 Jun 2011
Online Status: Offline
Posts: 65
Quote sa-user Replybullet Posted: 11 Aug 2011 at 5:47am
1 at a time works..
otherwise it kind of does a union of both the commands
IP IP Logged
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Posted: 12 Aug 2011 at 4:53am
 { Command1.field= {parameter}
 { Command2.fiedl= {parameter}
 
Are these two parameters the same one or different ones?
I'm not sure if that would make a difference but it might.
 
How about trying a Case statement.
 
}
IP IP Logged
sa-user
Groupie
Groupie


Joined: 29 Jun 2011
Online Status: Offline
Posts: 65
Quote sa-user Replybullet Posted: 12 Aug 2011 at 5:29am
The paramaters are the same but the Command1 and Command2 are different.
 
If command1 is selected i would need 5 fields as per command 1 displayed on the report.
 
If command2 is selected i would need 3 (other)  fields as per command 2 displayed on the report.
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