Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

10.05 Setting the Evaluate Option

Setting the Evaluate Option

The Evaluate option determines when a new element is shown on the chart. On a standard vertical chart, this would be the elements listed on the X-axis. For example, this determines when a new bar is drawn on a bar chart. There are three options to choose from and they are listed in Table 10-3.

Table 10-3. The Evaluate options.

Evaluate Option Description
On Change Of A new element is created when the value of the field changes. The value plotted on the other axis is the sum of all fields that are in each group.
For Each Record A new element is created for each detail record in the table. Check the number of detail records because too many records will over-crowd the chart.
For All Records Shows a single element on the chart. The value plotted on the other axis is the grand total of each field selected in the Show Value(s) list.

The On Change Of option requires a little more explanation than the other two options, which are fairly straightforward. The On Change Of option is used in conjunction with one or more report fields. It creates chart-only groups and summarizes the values within the group. The groups in the chart have no effect on the rest of the report.

When selecting the On Change Of option, you add the field(s) to group on to the listbox below the option. The number of fields you add determines how many groups are in the report. If you only have one field, then each group name is listed as a single element on the chart. For example, Figure 10-3 shows a chart with an Evaluate field of Customer Name and the Show Value field (discussed later) is Order Amount. This creates an element for each customer and it charts the total amount of all the orders in the report.



Figure 10-3. A chart with one field in the Evaluate list.

Having more than one field in the Evaluate list creates sets of data. Each set has the same number of elements in it and they are compared to each other as a group. The first element is the primary group and the second element is the sub-group. The primary group determines the sets that are charted. The sub-group charts each individual element within the primary group.



Figure 10-4. A chart with two fields in the Evaluate list.

The chart in Figure 10-4 also shows the total customer order amounts, but it does it per the month the order was placed. Putting two fields in the Evaluate list does this: The Order Date, by month, and the Customer Name. The Order Date is listed first so that the data sets are charted by month. The Customer Name is listed second so that it gets listed as a separate element on the chart.

For each field listed as an element, there are a few ways to customize it. Directly below the list are two buttons: TopN and Order. These are only enabled when you select one of the fields. These two buttons bring up the same dialog boxes that are used with formatting groups. The TopN button lets you filter the groups according to their overall ranking. The Order button lets you select whether the groups are sorted by Ascending, Descending, or Natural Order. You can also tell it to sort in a specified order. Please reference Chapter 4 if you need a refresher on how these dialog boxes work.