Please follow below steps..
Step 1. Create Proc using UNPIVOT and Property(ColunName) & Value with ID column (PKey) like
SELECT Pkey,tblPivot.Property, tblPivot.Value
FROM (SELECT EmpNo AS Pkey, CONVERT(sql_variant,EmpNo) AS EmpNo, CONVERT(sql_variant,EName) AS EName, CONVERT(sql_variant,JOB) AS JOB,
CONVERT(sql_variant,Sal) AS Sal FROM EMP) EMP
UNPIVOT (Value For Property In (EmpNo,EName, JOB, Sal)) as tblPivot
Step 2.
Create a Matrix Report using above SP with row-grouping on [Pkey] and col-grouping on [Property] and Display value ...
Step 3 Now you can add/remove column in SP (step 1) based on your requirement
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…