• Hey Koen,

    The actual report has more columns, but the issue would remain the same and I hid those for posting purposes. Would you be able (or willing) to guide me through this process? I am relatively new to SSRS and I have never used a matrix.

    As for my query, I'll post it here. It's pretty straight forward, taking a couple of variables and pulling back the drive (event) info that fall within the date range.

    Create Procedure Hemasphere_IncentiveReport

    @startDate datetime,

    @endDate datetime,

    @RegID varchar(8000),

    @OrgID varchar(8000),

    @SubID varchar(8000),

    @COID varchar(8000),

    @EquipmentID varchar(8000)

    As

    Begin

    Select

    DM.DriveID [DriveID],

    DM.FromDateTime [FromDateTime],

    Case When DM.OwnerType = 0 Then Acct.Name Else CD.DescLong End As [OwnerName],

    CO.CodeID [CO_ID],

    CO.Description [CO_Desc],

    Org.CodeID [Org_ID],

    Org.Description [Org_Desc],

    Sub.CodeID [Sub_ID],

    Sub.Description [Sub_Desc],

    Reg.CodeID [Reg_ID],

    Reg.Description [Reg_Desc],

    Inc.Description [Incentive]

    From

    Hemasphere_Dev.[dbo].rpt_DriveMaster DM

    Left Outer Join Hemasphere_Dev.[dbo].rpt_Accounts Acct on DM.AccountID=Acct.AccountID

    Inner Join Hemasphere_Dev.[dbo].rpt_CenterDetail CD on DM.CenterID=CD.CenterID

    Inner Join Hemasphere_Dev.[dbo].IDViewCollectionOp CO on CD.CenterID=CO.CodeID

    Inner Join Hemasphere_Dev.[dbo].IDViewRegion Reg on CD.Region=Reg.CodeID

    Inner Join Hemasphere_Dev.[dbo].IDViewOrgCenter Org on CD.OrgCenter=Org.CodeID

    Inner Join Hemasphere_Dev.[dbo].IDViewOrgSubCenter Sub on CD.OrgSubCenter=Sub.CodeID

    Left Outer Join OBAPPS.[dbo].OBI_Incentives Inc on DM.DriveID=Inc.DriveID

    Where

    DM.StatusID <>5

    And DM.FromDateTime Between @startDate AND @endDate

    And CO.CodeID In (Select Number From dbo.fn_SplitInt(@COID,','))

    And Inc.EquipmentID In (Select Number from dbo.fn_SplitInt(@EquipmentID,','))

    Order By [FromDateTime], [OwnerName], [CO_Desc], [Rec_Desc]