Reputation: 57
I have in my report a few needed arguments like 'A','B','C'
and I would like to pass it using SQL.
How can I do that?
I tried prm_szDiscType='C','N','P'
, prm_szDiscType = C,N,P,
and prm_szDiscType=''C'',''N'',''P''
Upvotes: 2
Views: 9740
Reputation: 2715
I'm not sure how you pass parameters via URL.
In Crystal Reports desktop client, I created a Command Parameter with "Allow multiple values" check on.
Then in my Command SQL, I use a where clause such as:
where item in {?Item}
When you check "Allows multiple values" on, Crystal will create the clause after in
. If you select Value Type of String, the values you enter will automatically be wrapped in single quotes.
Credit to ExpertsExchange thread on command parameters ;)
Upvotes: 3