cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Command code for multiple value string parameter

Former Member
0 Kudos

Hi,

I'm using crystal 2008 and there is a check box for multiple value SQL Command I need some help in writing the SQL Command code for oracle (or sql server) for a multiple value STRING parameter.

Thanks in advance,

Marilyn

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I could be wrong here, but I do not believe you can pass a multiple valued parameter to an SQL Command data source. How I have gotten around this in the past is to put the "real" report into a subreport. In the main report, create a formula field (basic syntax):


formula = join({?parameter}, "|")

Then, use this to pass the selected values to the subreport's parameter (call it {?sr-parm}). The SQL Command in the subreport can then use that (MS SQL):


select *
from table
where charindex(table.field, '{?sr-parm}') > 0

HTH,

Carl

Former Member
0 Kudos

Hi Carl,

Thanks for the help.

Marilyn

Answers (0)