Convince70


Quick question guys, I remember running into this before but can't remember if I was able to complete it or not.

What is the syntax format in the 'Report Parameters' dialog box selecting 'Non-queried' in the "value " field I want to select multiple value parameters ie 001, 002, 003, 004 for one "label" Every combination I tried it's not taking. Thanks in advance




Re: Non-queried Parameters

adolf garlic


and what happens if you just enter "001,002,003" as the value

assuming the datatype is string






Re: Non-queried Parameters

Convince70

Thanks for the response. I have verified that the data is a string and when I put in the value as you suggested or many other variations I have tried, it will run but will return a "0" match but I know that there should be a match. If you only enter one value it will return results.

Here is my parameter: WHERE location_type IN (@Type)

Then in the report parameter dialog box I select "Non-Queried"

Label Value

Mail Order 001

Pharmacy 001, 002, 003 (will work if I only place one value)

This will return results for "Mail Order" but returns "0" for Pharmacy. I figure it's just as simple as a syntax issue but so far I cannot find any examples of this.






Re: Non-queried Parameters

adolf garlic

The issue is with SQL, not with RS.

http://www.eggheadcafe.com/software/aspnet/30883496/multi-value-parameter-hel.aspx

etc

on the web





Re: Non-queried Parameters

Convince70

If it was a SQL error would it not work if I used within the SQL where clause But if I wrote it as

WHERE date_of_service IN ( '001', '002', '003')

It will work, would that not indicate an RS issue





Re: Non-queried Parameters

kbutterly

Good morning!

If I may make a suggestion. Ask your DBA to run a trace for you when you run the report with the multi-valued parameter. The trace will show you _exactly_ what SQL is getting. That should help you in isolating where the issue is occurring.

BTW, I am assuming you have tried passing in '001','002','003'

Let us know what you find,

Kathryn





Re: Non-queried Parameters

kbutterly

Also, have you read through this thread

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=2216804&SiteID=1

It sounds similar to your issue.

Kathryn





Re: Non-queried Parameters

Aiwa

Hi,

Are you using a stored procedure

If you do, maybe you could have a look at this Table Valued User Defined Function sample: http://www.sql-server-helper.com/functions/comma-delimited-to-table.aspx.

I use something like this with all my multi-valued parameters, it works great and I can reuse the same function for every reports.

HTH,

Eric





Re: Non-queried Parameters

adolf garlic

You can't pass "1,2,3,x" to sql and have a sql stmt like

where x.column in @param

It doesn't work 'as is'

Hence the links posted above showing workarounds.