Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

How can i design the dynamic SSRS Tabular Report when the columns list vary based on the parameter value. I mean a stored procedure returns 2 to n number of columns based on parameter value. If we have fixed number columns then there is no problem with design. But, how can i design layout if the columns list varies?

Please find my stored procedure (Dataset) below:
SQL
CREATE PROCEDURE USP_GetReport @Param INT
AS
BEGIN
	IF (@Param = 1)
	BEGIN
		SELECT COL1
			,COL2
			,COL3
			,COL4
		FROM TABLENAME
	END

	IF (@Param = 2)
	BEGIN
		SELECT COL1
			,COL2....COLn
		FROM TABLENAME
	END
END
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900