Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 TSQL Problem

Author  Topic 

gvgonong
Starting Member

6 Posts

Posted - 2006-11-07 : 21:09:25
I'm using SSRS 2005 and running with SQL Database 2005.

I have a combo box in the RDL and i set it into a multiple selection. it returns an INT from 0 to 3, where 0 - Gross, 1 - Nett, 2- Nett Nett, and 3 - All. All with different computations and has a summary. The computation is in the Stored Proc.

Now.

The condition is if i select a multiple value let say i choose 2 and 3 in the combo box. I should get the result of 2 and 3 that i will display in the report.

Is there's any way of displaying the result first in the Stored Proc, before i can display it in the RDL?

Thank you in Advance,

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2006-11-12 : 20:30:25
You could use profiler to see exactly what SSRS is sending to the database, but I don't know of any way to see output in that process other than back in the report. But you could copy the statements that profiler identifies and run them in SSMS yourself.

Incidentally, I don't think you're going to get much of anything this way actually, because according to the SSRS Help system, "the source for a multi-valued parameter cannot be a stored procedure"

---------------------------
EmeraldCityDomains.com
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2006-11-14 : 13:40:25
Well, so much for believing the manual... I have been corrected by a coworker that you can pass a multivalued parameter to a stored procedure, but the catch is that what you get is a CSV list in your parameter. As we all know, you cannot just do a simple myField IN @Parm type of code. You have to find a way to handle the CSV properly in your stored procedure. There are several articles on the site here on ways to handle that. The approach we have in our office is that we have a UDF that converts a CSV to a single-column table. And then we do a myField in (SELECT ParmColumn FROM F_SplitMyParm(@Parm)).

---------------------------
EmeraldCityDomains.com
Go to Top of Page
   

- Advertisement -