TechSapphire Monday, 2024-06-17, 10:54 PM
Site menu
Login form
Play Games
  • Deep Freeze
  • Ice Slide
  • Gyroball
  • Fat Fish
  • Bush Royal Rampage
  • 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
    SELECT      row_number() over(order by customerid) rownum,  CompanyName 
    FROM            Customers

    Step 2: Generate output using PIVOT operator.

    CREATE VIEW DynamicCol
    [1] [Col1],[2] [Col2],[0] [Col3]
    (SELECT CompanyName, rownum%3 rownum,row_number() over(partition by  rownum%3 order by CompanyName) rn
        FROM CustWithRow) AS SourceTable
    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.




    Programming [27]
    Tips for programming
    Security [2]
    Security Tips
    Google [1]
    Use google faster then ever you use
    Project [14]
    HTML [2]
    Electronics [0]
    Data Structure [0]
    Database [16]
    SSRS [1]
    Sql Server Reporting Services
    Copyright MyCorp © 2024