How To Get Data in 2 Matrix Report by grouping those in List box

Arrow 1 Reputation point
2022-09-18T11:44:45.443+00:00

H!, I was trying to combine 2 Matrix report in SSRS but the out come result is not what I want. I need to header columns to be fix even there are not data for those particular dates. attached image shows what I am trying to do and the what is the out put and I am trying to get out of it. Hope someone can help me.

Same been posted in242233-q52ac.jpg

Thanks

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,063 questions
Developer technologies | Visual Basic for Applications
Developer technologies | Visual Studio | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2022-09-19T06:40:56.297+00:00

    Hi @Arrow
    I did a test. These are the two matrices created by DataSet1.
    242397-1.png
    Then add a List to the report and drag and drop the two matrices into the List. Mouse click to select List to display tablix properties of list, select DataSetName as DataSet1.
    242358-2.jpg
    Then select List, in the row groups pane below, right-click Details to display the Details row property, and add [id] as the grouping by.
    242384-3.jpg
    Preview:
    242398-4.png
    Best regards,
    Aniya

    0 comments No comments

  2. Arrow 1 Reputation point
    2022-09-19T08:21:57.52+00:00

    Dear Aniya,
    Thank you for the reply.
    Actually I am trying to get the required dates as headers using "With Statement" as below with 2 Parameters Passed

    WITH PayrollMonth(PRM)AS
    ( SELECT CAST(@LTSFrom as DATETIME)
    UNION ALL SELECT PRM + 1
    FROM PayrollMonth
    WHERE PRM < @LTSTo)

    the issue is all dates will appear between 2 parameter dates but the issue is, for those dates with no data "id" column shows as "NULL" when execute the Stored Procedure. So when I group it by "id" dates are not getting displayed for those "id"s which appeared as null. Like below

    242408-image.png

    Thanks again


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.