In the previous exercise, you have seen a small subset of features associated with Report Designer. In this exercise, you will add a chart to your report.
- Click File > Open and find the report you just saved. Click OK.
- In the Palette, click and drag a Chart into the Report Footer band.
- Use the resizing handles to center and stretch the chart. You can also adjust the width of the band as shown in the following example:
- Double-click the sample chart.
- The type of chart most appropriate for your report is a pie chart. In the top portion of the Edit Chart dialog box, select the pie chart icon. The pie chart properties that define its look and feel are listed in the left pane of the Edit Chart dialog box. Properties associated with the data in the chart are listed in the right pane.
- Go to the Title properties. Next to the chart-title property, enter in Product Pie Chart.
- Under Common in the Primary DataSource tab, click the down arrow next to value-column click the ellipsis [...] button to open the Select Field dialog box.
The value-column specifies the actual values (measures) you want to chart. In this instance, you want to chart the quantity ordered as shown in the following figure:
- Select QUANTITYORDERED from the list and click OK.
- Under Series, click the ellipsis [...] button next to series-by-field to open the Edit Array dialog box. Series-by-field specifies the field you are charting. In this instance you are charting by product line. Series are usually placed in the chart legend.
- Click (Add).
- Click in the blank field to expose the drop-down arrow.
- Select PRODUCTLINE from the list and click OK.
- Click OK to exit the Edit Chart dialog box.
- Click (Preview) to display your report.
- When the report displays, go to end of the last page to see the following example:
Save your report.
If you want to display a bar or line chart instead of a pie chart, use the chart settings as shown in the following figure:
You have to add the series-by-value setting manually in the Edit Array dialog box. Click (Add) and type SALES; click (Add) and type COST. Running the report displays the bar chart as shown in the following example.
You are now ready to add a parameter to your report.