CHAPTER 6 BUILDING REPORTS
dataset, so the result should be in line with the details of the report. Open the
EmployeeServiceCost_MVP_Chart_Start.rdl report found in the Pro_SSRS project and follow these steps
to add the chart to the report:
- On the Design tab, click and drag the table you have already defined to make
room for the chart. - Click and drag the Chart data region to an area above the table.
- Right-click anywhere on the chart, select Change Chart Type, and in the Bar
area select Stacked Bar. - Using the Chart_DS dataset already defined for your report; drag the DiagVisits
to the Values area of the chart. - Drag the Diagnosis field to the Category Groups area of the chart.
- Drag the Patient_Count field to the Values area underneath the DiagVisits
series of the chart. - Resize the chart so that it aligns with the table below it. You can select both
report elements, and on the toolbar select the Make Same Width icon. - Right click on the Diagnosis Category Group and then click on the Filters tab.
Click the Add button to add a filter to the category group. Because you want to
make the report show only the top ten diagnoses, you need to add a filter to
this grouping. You will use the Top N operator to make this happen, as shown
in Figure 6-34, based on the top ten diagnoses by a sum of the Diagnosis visit
count. While you’re in the Diagnosis Category Group properties, click on the
Sorting tab. Change the default sort by to the expression
=SUM(Fields!DiagVisits.Value) and select A to Z for the sort order.