Hi Guys,
Need help here. I am working on Project in SSRS where users can run and execute the standard report. One user report for all users and users can Hide and display Columns/Field name change. I was thinking
If I load the data into table and display from there. Please see below sample code
CREATE TABLE #Data
(
ID INT IDENTITY(1,1),
NAME VARCHAR(50),
DATE VARCHAR(10),
City VARCHAR(15)
)
CREATE TABLE #Display
(
ID INT IDENTITY(1,1),
Display VARCHAR(50),
ColumnName VARCHAR(10)
)
INSERT INTO #Data
( NAME, DATE, City)
VALUES
( 'Mr John Smith','2005-05-20','Chicago'),
( 'Mr.Smith', '2014-01-13','New York'),
( 'ACME Social Club', '2012-12-01', 'Los Angles')
INSERT INTO #Display
( Display, ColumnName )
VALUES
('YES', 'FullName'),
('NO' , NULL),
('YES', 'GoodCity')
SELECT * FROM #Data
SELECT * FROM #Display
Here IS what I want the END RESULT
ID FullName GoodCity
1 Mr John Smith Chicago
2 Mr.Smith New York
3 ACME Social Club Los Angles
Any advice would be greatly appreciated.
Thank You