Charting Overview

Objectives

After completing this lesson, you will be able to:

  • Present data using the Chart Expert

Chart Data and Location

Improve report visualization using charts.

Crystal Reports enables you to include sophisticated, colorful charts in your reports. You can use charts any time to improve the usefulness of a report.

You can chart on the following:

  • Summary and subtotal fields

  • Details, formula, and Running Total fields

  • Cross-Tab summaries

  • OLAP data

You will typically chart on summary and subtotal information at the group level. Each chart becomes an object on your report, and therefore can be moved, re-sized, and so on.

Not all chart styles work with all data. For example, a report that shows the total sales for each state would make a good pie chart but a meaningless stacked bar chart, since only one series of data exists. On the other hand, if you had a report that showed inventory levels of certain items for each quarter of the year, that information would make an excellent stacked bar chart, but not work in a single pie chart.

Where you place your chart determines what data is displayed and where it is printed. For example, if you place a chart in the Report Header section, the chart includes data for the entire report. If you place it in a Group Header or Group Footer section, the chart displays group-specific data.

Chart Expert Overview

The Chart Expert dialog box allows you to choose the type of chart to display, select the data on which the chart is based, apply conditional color highlighting, as well as customize the options and formatting for the chart.

Using the Chart Expert

The Chart Expert is a tabbed dialog box. As you work through each tab, be aware that some options are not for use with some types of chart.

The tabs in the Chart Expert are:

  • Type

  • Data

  • Axes

  • Options

  • Color Highlights

  • Text

The Type Tab

The Type tab in the Chart Expert offers different predefined chart styles to choose from. To select a particular style, double-click the icon for the desired report.

The most common chart types are:

Bar
A side-by-side bar chart displays a series of vertical bars and is best suited for showing data for several years over a period of time. A stacked bar chart also displays data as a series of vertical bars and is best suited for representing three series of data with each series displayed as a different color stacked in a single bar.
Pie

A pie chart displays data as a pie, split and filled with color or patterns, and can only be used with one group of data.

The Data Tab

In the Data tab, you select the chart layout type you want to use.

The charting layout types are:

Advanced
Use the Advanced layout when you have multiple chart values or when you do not have any group or summary fields in the report.

The Advanced chart layout supports one or two condition fields; with these condition fields, you can create a 2D or 3D chart. Other specific functions with the Advanced layout include:

  • Values can be grouped in ascending, descending, or specified order, as well as by Top N or Sort totals.

  • Values can be plotted for each record.

  • Values can be plotted as a grand total for all records.

  • Charts can be based on formula and Running Total fields.

You cannot drill down on an advanced chart because the chart is already displaying all the data for that field.

Group

With this option, you can create charts based on any group summary or subtotal values.

In order to create a chart using the Group layout, you must have at least one group and at least one summary field in the report.

Cross-Tab

The Cross-Tab option is available when a report contains a cross-tab object and enables you to present the data in the cross-tab graphically. A Cross-Tab chart uses the fields in the cross-tab for its condition and summary fields.

OLAP

On-Line Analytical Processing (OLAP) is a business intelligence tool with the ability to perform "slice and dice" operations for multidimensional viewing and manipulation of data. Use the OLAP layout to chart on an OLAP grid.

Once you have selected your chart type, the appropriate choices are presented within the Data tab. If you have running totals in your report, you can select running totals fields to display them in the chart. Also, if you want to chart on all records so that the grand totals display, then select For all records from the drop-down list on the right side of the dialog box and specify a chart placement of Once per report. You also select the placement and data in the Data tab.

The Axes Tab

In the Axes tab you can specify properties that control the occurrence and frequency of data that divides axes on your chart.

By default, the data axis is not scaled automatically and always starts at zero. If you turn the Auto scale check box on, the data axis scales automatically. However, depending on the data, the data axis may not start at zero.

The Options Tab

On the Options tab, you can set the color of the chart, data points, customize settings, and choose whether or not to include a legend. If you do include a legend in a pie or doughnut chart, you can choose to display the data in percentages or in amounts.

The Color Highlight Tab

The Color Highlight tab lets you conditionally apply color based on chart value fields. You apply a color to the selected item by specifying a condition.

The tab is divided into two areas: The Item list area displays the formula conditions and the Item editor area is where you create the formula conditions.

Note
If your chart type is line, the chart must have data markers before you can see conditional formatting. An area chart must have two On change of values for conditional formatting to appear.

The Text Tab

The Text tab lets you specify different titles to be placed on your report explaining the various components. This tab always presents all options, even though some charts may not use them. For example, a pie chart would not have a group title or data title as available text options.

If you accidentally exit the Chart Expert, you can return at any time by right-clicking the chart in your report and selecting Chart Expert from the shortcut menu.

The chart you see in the Design window is a placeholder that prints the actual chart information when you switch to the Preview window. Therefore, the chart in the Design window will probably be different from what you were expecting based on your data. You can always return to the Chart Expert to redesign your chart.

If you place the cursor over the chart while in the Preview tab, a tool-tip with detailed information appears. For example, a chart that shows sales for different countries would read "USA: Sum of Customer.1997 Sales: 3410088.85."

No matter what type of chart you choose, the basic steps to produce a chart are the same.

Log in to track your progress & complete quizzes