Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

SSRS 2008 not returning correct dataset from Stored Procedure

$
0
0

Hi,

I have a stored proc which returns different no. of columns as output based on the input parameter. The issue I am facing is that the SSRS 2008 is always populating the column list of the dataset with the first select list irrespective of the input parameter.

How can I have the SSRS populate the column list based on the input parameter I am passing?

eg.

 

IF @type='test'

 

BEGIN

 

 

SELECT 1 AS Col1,2 AS Col2

 

 

END

 

 

ELSEIF @type='test1'

 

BEGIN

 

 

SELECT 1 AS Col1,2 AS Col2,3 AS Col3

 

END

 

SSRS always populates the dataset with two columns  viz col1 & col2 even when I pass'test1' as input parameter.

Thanks for the help in advance.

Sherin

 

 


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>