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!

Multiple Values in Parameters - Select Expert

Status
Not open for further replies.

kutoose

Technical User
Sep 11, 2002
169
US
Crystal Reports 8.

Need to modify a report in which an ASP page is passing the parameters to the report. The report has a 'Region' parameter which can have discreet values. Now the logic has to be changed in which the user can select multiple values for region or * for all regions.

How can this be done ? If there are multiple values to region it is passed as commas separated values to the report. I think the select expert has to me modified ...

Thanks !
 
Do you mean that the user selects a PARTICULAR region or else selects every region.

Do a formula fields, @GOOD_PARAM

Your_Param = "*"
or
Your_Param = {record.region}

Then test for @GOOD_PARAM in your selection statement.

(Note that this is a boolian, a test without an 'IF@ and which will be true or false. You can test @GOOD_PARAM = true, but just saying @GOOD_PARAM impicitly does this.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Thanks for yor time Madawc,

The user can select one region or two regions or n regions or * ( which means all regions)

In the first case the parameter passed to the report is "CA"
if there are more than one parameter passed is
"CA","NY","CT" etc or it can be "*
 
First you should enter "*" (without the quotes) as your topmost default parameter option. Then create a record selection formula like:

if {?parm} <> "*" then
{?parm} = {table.region} else
if {?parm} = "*" then
true

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top