Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Modifying Parameter Value in Record Selection Post Reply Post New Topic
Author Message
JasonRkr
Newbie
Newbie


Joined: 06 Aug 2014
Location: United States
Online Status: Offline
Posts: 1
Quote JasonRkr Replybullet Topic: Modifying Parameter Value in Record Selection
     Posted: 12 Aug 2014 at 1:03pm
Hi, all. What's the recommended way to modify the value of a parameter used in record selection? My database (SQL Server 2005) has a field called User. I want my parameter to pass a group of users depending on the value selected. For example:

Group1 = Tom, Jerry, Dog
Group2 = Shaggy, Velma, Fred
Group3 = Bilbo, Frodo, Samwise

Also, is this described in any of the training material? I can't seem to find anything.

Thank you,

Jason
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 13 Aug 2014 at 2:13am
Go to Report, Selection Formula, Record. Add something along the lines of:

({?GroupParam}='Group1'
and
('Tom' in {table.namefield}
or
'Jerry' in {table.namefield}
or
'Dog' in {table.namefield}))

or

({?GroupParam}='Group2'
and
('Shaggy' in {table.namefield}
or
'Velma' in {table.namefield}
or
'Fred' in {table.namefield}))

etc...

NOTE-I'm not a master of formulas, so there may be a more concise way to create a selection formula that will do the same thing, but this should get you what you want.




Edited by FrnhtGLI - 13 Aug 2014 at 2:17am
|< /\ '][' ( )
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