Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax for multiple values

Status
Not open for further replies.

tampitt

Technical User
May 23, 2013
6
US
Hello everyone

I have this field in database with various values from 1 to 23.
If I only need one value it's easy enough, but what if I need 3 values, I have tried various ways but Crystal doesn't seem to take it

for example: I need to extract rows with value 1, 7 and 15
I would think [1,7,15] would work, but it doesn't, or simple 1,7,15

thanks in advance everyone

newone
 
Define the parameter as a multivalue parameter and put this in the record selection formula ( replace the field and parameetr name):
{Table.Field} IN {?Parameter}

Viewer and Scheduler for Crystal reports and SSRS.
 
thanks, but I don't know much about the parameter...all I was looking for is this...the current formula, in there I have the value 1
and there will be time where I will need several values, like 1,3,8....I thought there is simple way to put into formula like 1,3,8 or [1,3,8] but so far Crystal will give me error
 
You will need to use square brackets (unless it is going into SQL code, in which case the round brackets are correct), eg:

Code:
{Table.Field} in [1,3,8]

Cheers
Pete
 
Thanks everyone, the one from Pete {Table.Field} in [1,3,8] works!

newone
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top