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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Parameter Record Selection Issue 1

Status
Not open for further replies.

cLFlaVA

Programmer
Jun 14, 2004
6,450
US
Hi.

I am using multiple parameters passed to a CR 10 report through ASP/CSP. I have already referenced thread149-813765, which seemed helpful, but didn't help me with my situation.

I have two multiple-selects in my web app. They are both similar to this:

[tt]
Field 1:
--------------------
| | |
| Bus. Unit 1 | |
| Bus. Unit 2 | |
| Bus. Unit 3 |v|
--------------------
[/tt]

where a user can select any number (including 0) of business units.

I then have a parameter in the crystal report that is set to accept multiple values.

I have this working where if a user selects no values, all business units display. It also works if a user selects one business unit.

[red]My problem is: why doesn't this work when more than one business unit is selected?[/red]

Here is my record selection formula:

Code:
If "***ALL***" = {?strBusinessUnits} Then
    True
Else
    {Command.BUSINESS_UNIT} = {?strBusinessUnits};

Thank you so much for your help.

Cory

*cLFlaVA
----------------------------
[tt]your mom goes to college[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
How about this;

Code:
(If {?strBusinessUnits} <> "***ALL***" then
{Command.BUSINESS_UNIT} = {?strBusinessUnits}
else If {?strBusinessUnits} = "***ALL***" then true)
 
When I drag the parameter field directly onto the report (to see what the value is), after selecting GITS and Group Finance, it displays like this:

GITS,Group Finance

is that correct?

*cLFlaVA
----------------------------
[tt]your mom goes to college[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
i have resolved this problem in a sticky way --

i made the parameters single-value parameters and passed the multiple values in as a comma-separated list.

then, i did a check to see if the field was in the list.

*cLFlaVA
----------------------------
[tt]your mom goes to college[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top