Show data or details in horizontal layout in SSRS
To show data in horizontal layout like mentioned below:
Example 1:
Step 1: Drag matrix
Step 2: Select column to be displayed horizontally in column group.
Step 3: Delete row group
Step 4: Delete Column header but delete only row not associated group.
Example 2:
Step 1: Generate a view with row number and column which you want to use horizontally.
CREATE view CustWithRow
as
SELECT row_number() over(order by customerid) rownum, CompanyName
FROM Customers
Step 2: Generate output using PIVOT operator.
CREATE VIEW DynamicCol
as
SELECT
[1] [Col1],[2] [Col2],[0] [Col3]
FROM
(SELECT CompanyName, rownum%3 rownum,row_number() over(partition by rownum%3 order by CompanyName) rn
FROM CustWithRow) AS SourceTable
PIVOT
(
max( CompanyName)
FOR rownum IN ([0],[1],[2])
) AS PivotTable;
Step 3: Use view directly on report.
Note: For learning PIVOT in detail click here.