1

I want to make a Sequential Group Column with the help of Matrix in SQL Server Reporting Service (SSRS),

enter image description here

In the image above, there are Dates with Days name, Mon 24, Tue 25 and Fri 28, So I want to make it like that: Keep the sequence of Dates, no matter whether the data is available or not.

enter image description here

My SQL Query for generating that data is:

SELECT tl.[Job No_] + ' - ' + j.[Description] AS [Job Name]        
      ,tl.[Job Task No_] + ' - ' + w.[Description] AS [WBS Code]
      ,pt.[Description] AS [Pay Type]
      ,tlt.[Period Date]          
      ,tlt.[Hours] AS [Hours]
 FROM TimesheetLine tl 
 JOIN TimesheetLineDate tld ON tl.[Rec ID] = tld.[Timesheet Line Rec ID]
 JOIN TimesheetLineTransactions tlt ON tld.[Rec ID] = tlt.[Timesheet Line Date Rec ID]
 LEFT JOIN Job j ON tl.[Job No_] = j.[No_]
 LEFT JOIN JobWBS w ON w.[Job Task No_] = tl.[Job Task No_]
 LEFT JOIN PayType pt ON tl.[Pay Type] = pt.[Name]
 LEFT JOIN Timesheet t ON tl.[Timesheet Rec ID] = t.[Rec ID]
 WHERE tl.[Timesheet Rec ID] = @RecId AND t.[Resource No_] = @UserResourceNo

1 Answer 1

1

SSRS cannot generate data so you will need to solve this in your dataset.

I would add a right join to a table of Dates e.g. a Date/Time Dimension table. Then I would use the date from that table as the label and values for the SSRS Column Group.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.