Ignoring the actual SQL for now (it would be better to show the results of this rather than the t-sql)...
I think you have enough to build the report, with the exception of the Year which you don't appear to be returning. Once you have corrected this...
- Create a new report and create your dataset as normal
- Add a Matrix (not a table) to your report.
- Add 2 Row Groups first goruped by Year and the second (child group) grouped by AppointmentSource
- Add a column group, grouped by MonthNumber
- Choose NumberOfAppointments as the value
That's it, you should get the results as above more or less.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…