Using a chart in a table
You can create a report that consists only of a chart, or you can incorporate a chart with other elements, such as tables, lists, and images. You can specify a chart data set that is different from the data set that you use for the rest of the report. For example, a chart that you place in a customer list could show the total sales for each customer. The customer list might use one set of data, such as customer names and addresses, whereas the chart uses a data set that returns the sales totals.
A chart that you place in a table typically uses the same data set as the table. In a table that groups data, you would usually want the chart to use the same grouping setup as the table.
You usually place a chart element in the following places:
*A table header or footer
The chart displays data for the entire data set.
*A group header or footer
Each group section includes a chart, and each chart displays data for its group section.
*A detail row
Each detail row in the completed report includes a chart, and each chart displays data for its detail row.
For example, after placing a chart in a table header, select the Inherit Data from Container option. The container is the table. When you place a chart in a group header or footer and specify this option, the chart uses all data for the group. After selecting the option to inherit data from the container, select the inheritance mode, as shown in Figure 20‑42. Available inheritance modes are:
*Inherit columns and groups
The chart displays one data point for each section created by the section or table. Aggregation, grouping, or sorting are not available.
*Inherit columns only
The chart receives the detail data rows used by the section or table. Aggregation, grouping, and sorting are available.
Figure 20‑42 Setting the chart to inherit data from its container
Figure 20‑43 shows the design for a report that includes Classic Models, Inc. database order information that is grouped by product line, such as classic cars, motorcycles, and ships. The report uses a chart to present the order totals graphically.
Figure 20‑43 Report design including a chart in a group section
Figure 20‑43 shows that the group section uses a header, row["productLine"]. The report positions the chart above the order details.
When you preview the chart, the data for a productLine group consists of one section. Each group provides a chart before listing the order details. Figure 20‑44 shows the order details for the product line, ships. Details include ship product codes, names, vendors, and other details.
Figure 20‑44 Report including a chart in a group section