StringList parameter - how to use in a sql query

Stimulsoft Reports.NET discussion
Post Reply
debraballenger
Posts: 4
Joined: Mon May 14, 2012 6:55 pm

StringList parameter - how to use in a sql query

Post by debraballenger »

Hi All,

I want to have a list parameter in my report for users to select multiple values from my list. And then pass this list to a sql statement for use like this: IN (@Parameter)
I have the parameter in the query defined as a varchar(1000) and the variable as a String List. I am getting the following error in the report when I render it.

Failed to convert parameter value from a StringList to a String.

Any suggestions for how to make this work?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: StringList parameter - how to use in a sql query

Post by Alex K. »

Hello,

Please see the sample report in attachment.

Thank you.
Attachments
ReportWhereInQuery.mrt
(7.42 KiB) Downloaded 1017 times
wayniac10
Posts: 1
Joined: Tue Oct 29, 2013 1:27 am

Re: StringList parameter - how to use in a sql query

Post by wayniac10 »

HI Guys, The attached report does not seem to be working correctly/
there are 2 variables 1 of type string another of type int (list)
in the SQL query the syntax references the variable of type string.

I think what we looking for is how to pass a string variable of type list to a sql query.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: StringList parameter - how to use in a sql query

Post by Alex K. »

Hello,

The report works correctly.

Thank you.
Attachments
Capture.PNG
Capture.PNG (60.91 KiB) Viewed 3538 times
Post Reply