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

Joined: 27 Feb 2008
Location: United States
Online Status: Offline
Posts: 8
Quote jhudson77 Replybullet Topic: Parameter formula
     Posted: 27 Feb 2008 at 3:52pm
I have a particularly weird parameter that I would like to run on my report.  It starts out easy in that I would like the option for users to select "All" or individual items from a list.  However, items in that list can be further grouped into two sub-groups.
     How can I all the users to also be able to select those two sub-groups for selection criteria?
 
This is what I have right now:
Parameter Name = Plant
Underneath that I have = All, All Group1, All Group2, Inidividual Plants (each one belongs to either group 1 or group 2).  Each one of the individual plants falls underneath Org.OrgName
 
For my selection criteria I have the following formula:
if {?Plant} = "All" then True
else {Org.OrgName} = {?Plant}
 
I'm thinking that I have to add and 'else if' statement but all the combinations I can think of haven't resulted in anything but a blank screen.
 
Any suggestions?
 
IP IP Logged
jhudson77
Newbie
Newbie
Avatar

Joined: 27 Feb 2008
Location: United States
Online Status: Offline
Posts: 8
Quote jhudson77 Replybullet Posted: 03 Mar 2008 at 10:46am
Alrighty then...................this is what I have come up with.  I still need a little help but, this will work if I can just figure out how to do what I'm about to explain.
 
What I've done is created three separate parameters.  One for plants in which the end-user can select all the plants or individual plants.  One for the one grouping of plants known as BWRs and another for the other grouping known as PWRs.
 
My formula is this:
(if {?Plant} = "All" then True
else {Org.OrgName} = {?Plant})
or
{Org.OrgName} = {?BWR}
or
{Org.OrgName} = {?PWR}
 
What I'm trying to do is when the end-user uses the pull down menu for BWR and PWR, all they see is a blank and "All BWRs" or blank and "All PWRs".  That part isn't the problem.
 
What formula would I use to make this display all of the plants designated as BWRs and/or PWRs?
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 03 Mar 2008 at 12:42pm
I don't know what your data looks like to be able to tell you how to set the record selection filter to use all BWRs. But let's assume that this data has a prefix of BWR...

{?Plant} = "All"
OR
{Org.OrgName} = {?Plant})
OR
({?BWR} = "All BWRs" AND {Org.OrgName} LIKE "BWR*")
OR
{Orb.OrgName} = {?BWR}
OR
({?BWR} = "All PWRs" AND {Org.OrgName} LIKE "PWR*")
OR
{Org.OrgName} = {?PWR}



Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
jhudson77
Newbie
Newbie
Avatar

Joined: 27 Feb 2008
Location: United States
Online Status: Offline
Posts: 8
Quote jhudson77 Replybullet Posted: 04 Mar 2008 at 11:54am
Very cool!  A variation of that worked for me!
 
Thanks a bunch!
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