Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Simple question on filtering Post Reply Post New Topic
Author Message
new2crystal1980
Newbie
Newbie


Joined: 13 May 2010
Online Status: Offline
Posts: 6
Quote new2crystal1980 Replybullet Topic: Simple question on filtering
     Posted: 13 May 2010 at 3:11am
I would like to filter my report info dependant on a field called USER3. 
 
I would like my report to have a paramater input box that has text strings.
 
When the string 'Actuarial' is selected from the parameter drop down I want it to pass the values ACT, FRS and FR to USER3 and only show transactions that meet that criteria on the report.
 
What settings do I need on my Parameter and on the selection expert and what formula fields do I need to create?
 
Thanks in advance
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 May 2010 at 4:04am
what are your other param options and what do you want them to equate to in the selection?
Create a paramter field
Add your values
Go into the select expert
Write your formula there. Something like
({?Param}='Actuarial' and table.users3 in ['ACT', 'FRS', 'FR'])
or
(Next param option here)
IP IP Logged
new2crystal1980
Newbie
Newbie


Joined: 13 May 2010
Online Status: Offline
Posts: 6
Quote new2crystal1980 Replybullet Posted: 13 May 2010 at 6:50am
 
I dont want to add any values from a data field.
 
I have just made my own strings up I want the selection of the string 'Actuarial' from a parameter list to have the same function as selecting the 3 values (FRS etc) froma  list populated by the field USER3
 
 
Cant i do this with an IF..THEN?
 
As in: IF parameter = Actuarial then pass ACT,FRS,FR to USER3?
 
ta
IP IP Logged
new2crystal1980
Newbie
Newbie


Joined: 13 May 2010
Online Status: Offline
Posts: 6
Quote new2crystal1980 Replybullet Posted: 13 May 2010 at 7:00am

Ignore the above I got it to work thanks!

Why does it use an AND statement? Can anyone explain the logic to a newbie?

Thanks

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 May 2010 at 7:31am
You generally do not want to use an If-then in your record select statement. You just want as simple of a TRUE/FALSE result per evaluated row as you can.
By using the AND it will only return TRUE (include the record) when both conditions are met. This AND basically replaces your If-Then.
Does that explain?
 
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