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!

Default value for multiple values Parameter

Status
Not open for further replies.

kamkaro

Programmer
Oct 25, 2006
23
CA
Hi All,
For Multiple value Parameter, my following code is working fine in Expert command. Code: where SA.SA_STATUS in {?status_flg}

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.
 
Try this instead:

Where ({?Status_flg} is null or SA.SA_STATUS in {?Status_Flg})

Note where I put the parentheses - if you have any other criteria in your Where clause, you'll need them in order to make the query work correctly.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Not sure if this is resolved or not, you have provided no feedback. This makes the thread virtually useless for anyone in the future who may have a similar issue.

Also, you might find that people will stop offering assistance when you make no attempt to advise whether the suggestion was helpful or not. A simple thank you (or perhaps even a Star) is a great way to indicate your appreciation for the assistance offered.

Cheers
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top