Print Page | Close Window

Mulitple Values in Parameter

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13719
Printed Date: 01 May 2024 at 7:33pm


Topic: Mulitple Values in Parameter
Posted By: sa-user
Subject: Mulitple Values in Parameter
Date Posted: 12 Jul 2011 at 7:44am

Hi I have a parameter and i have set "Allow Multiple Values" to true. However when i do a search by selectin multiple values i do not get any results back.

I Must be be missing something silly. Any clues on this.

 

Thanks in Advance




Replies:
Posted By: DBlank
Date Posted: 12 Jul 2011 at 7:53am
what is your select statement?


Posted By: sa-user
Date Posted: 12 Jul 2011 at 7:59am
My SQL (Command) statement has
 
like ('%{?Country}%'))
 
 


Posted By: sa-user
Date Posted: 12 Jul 2011 at 8:06am
I also tried with an in
 
in  ('%{?Country}%'))


Posted By: DBlank
Date Posted: 12 Jul 2011 at 8:08am
so you are using a COmmand parameter and letting uers type it content rather than a List Of Values (lov)?


Posted By: sa-user
Date Posted: 12 Jul 2011 at 8:17am
This is how my formula looks.
{Command.COUNTRY} like {?Country}
Users still have to select from a list of values,
But i want them to select multiple values and so the search should return all records.
 
While what i think is happening is in the search when i select multiple values it is anding while it should or


Posted By: sa-user
Date Posted: 12 Jul 2011 at 9:39am
What should it look like?


Posted By: DBlank
Date Posted: 12 Jul 2011 at 11:22am
are you using a command statement or the select expert in crystal?
in crystal you can just make it =
{Command.COUNTRY} = {?Country}
 


Posted By: sa-user
Date Posted: 12 Jul 2011 at 11:24am
I am using command statement


Posted By: DBlank
Date Posted: 12 Jul 2011 at 11:31am

i rarely use commands so not sure about this but you created the param in crystal not the command so you can populate the lov, correct?

if so move your select criteria into crystal and out of the command
(no where clause in teh command) as I don't think you can reference the crystal param in the command


Posted By: sa-user
Date Posted: 12 Jul 2011 at 12:22pm
How to move the SQL from command to crystal?


Posted By: DBlank
Date Posted: 13 Jul 2011 at 4:15am
you still use the command as your source without the where clause
in crystal go tot he select expert and add your select statement (similar to the where clause) there
 
{Command.COUNTRY} = {?Country}
 
Thsi applies the filter to the data after it is pulled from the DB but before it is displayed in teh report or used for calulations
 



Print Page | Close Window