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

Multiple values option in Parameter not working

Status
Not open for further replies.

kamkaro

Programmer
Oct 25, 2006
23
CA
Hi All,

Requirement:
Created one String parameter {?status_flg} where user can chose multiple values.

Using:
After created the String parameter, I selected the "Allows multiple values" check box, but when I am calling this parameter {?status_flg} in my Command(SQL expert), getting error 'right parenthesis is missing'.

code:
[highlight #204A87]WHERE SA.SA_STATUS_FLG in (join('{?status_flg}','','') )[/highlight]

Suggestion:
Please look at the above code, and let me know where I am doing wrong.

Appreciate that.

Thanks.
 
Multiple value parameter already exist as arrays, so this should work:

where SA.SA_STATUS in {?status_flg}

I just did a quick test with sample data and it worked as expected.
 
Hi,
Code: where SA.SA_STATUS in {?status_flg}
The above code is working perfectly fine. I can chose more than one values.

Now I am using the following code for default value (If user does not enter anything then crystal report use default);

Code: WHERE SA.SA_STATUS_FLG in decode({?Status_Flg},null,'40','','40',{?Status_Flg})

In the above code, either blank or multiple values not working. Only single value is working. For auto scheduling, I have to provide default value.

Please suggest me where I am wrong.


Thanks.

 
I think this would probably be handled best in the command/stored procedure logic, rather than make the parameter do all the work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top