Click here to Skip to main content
16,021,911 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am working on creating a new SSRS report where the table will consist of an "n" number of dynamic columns. These columns will be generated based on user selection, and I need to display only the relevant columns dynamically in the report.
Could you please suggest the best approach or provide any recommendations on how to achieve this functionality in SSRS?
SELECT ID, CODE, SUR_NAME, FIRST_NAME, MIDDLE_NAME FROM Employee WHERE CODE IN
('402498',
'SAP547',
'000007',
'000057',
'000106',
'000113',
'000133')

ID	    CODE	SUR_NAME   FIRST_NAME	  MIDDLE_NAME
2043587	000007	ZAYA	   KYAW THU	      NULL
2043637	000057	ANTONY	   GODWIN	      NULL
2043690	000106	BHARDWAJ   RAVI	          NULL
2043697	000113	JAGDEEP    JARYAL	      NULL
2043717	000133	GADHVI	   SANJAY NARAN	  NULL


What I have tried:

I have been researching the implementation of dynamic columns in SSRS and found that using a Matrix with column and row grouping is a common solution. However, I would like to know if there is a way to display the exact output from an SQL query in an SSRS report without using column and row grouping.
Is there a method or alternative approach to achieve this in SSRS?
Posted

1 solution

HINT: GROUP BY WITH CUBE()

search it on Google (if available)
 
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