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