Home Forums Reporting Services Reporting Services OK, what report items do I need to make this report/image attached RE: OK, what report items do I need to make this report/image attached

  • I can try to attach this thing... the fun part is that I had to do some voodoo to get all the dates to show up. Here's the query that I used for the subreport (the matrix reports for each year):

    SELECT c.CalendarDate, c.MonthNumber, c.YearNumber, c.DayNumber, m.MoveInID, m.MoveInDate, m.Division,

    CASE WHEN MoveType = 1 THEN 'Move In' ELSE 'Referral' END AS TransType

    FROM Calendar AS c LEFT OUTER JOIN

    MoveIn AS m ON c.CalendarDate = m.MoveInDate

    ORDER BY c.CalendarDate

    The only catch is that it requires a Calendar table.

    CREATE TABLE [dbo].[Calendar](

    [CalendarDate] [date] NOT NULL,

    [MonthNumber] [tinyint] NULL,

    [YearNumber] [int] NULL,

    [DayNumber] [tinyint] NULL,

    PRIMARY KEY CLUSTERED

    (

    [CalendarDate] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    ) ON [PRIMARY]

    It was the only way I could get all the dates for a month even if the date had no referrals or move-ins.

    The rest is easy, right?