HP Intelligent Management Center Standard Software Platform User Manual

Page 238

Advertising
background image

2.

Click the Conditional Formula button next to the X position value

field.

3.

In the Formula Workshop, enter your conditional X position formula text.

For example, enter formula text such as this:

numbervar hLevel := HierarchyLevel (1);
numbervar deltaX := 0;
if (hLevel > 1) then

deltaX := (hLevel - 1) * 0.4;

deltaX := deltaX * 1440;

Note:

There are several ways that you can create this formula; this code is
an example of one way.

Positions are measured in twips; there are 1440 twips in an inch.

Search the online help for "HierarchyLevel (GroupingLevel)" to learn more
about the function used in this example.

4.

Click Save and close to return to your report.

5.

Click OK to save your position setting.

Crystal Reports moves the values in your hierarchical data to new positions
based on their level in the hierarchy, but leaves other objects that are on the
same lines where you originally placed them.

Characteristics of the data needed for hierarchical grouping

You can group data in a report to show hierarchical relationships. When you
group data hierarchically, Crystal Reports sorts information based on the
relationship between two fields. A hierarchical relationship must be inherent
in the data that you use for the report:

Parent and child fields must be of the same data type for the program to
recognize a relationship between them.

The data in the parent field must be a subset of the data in the child field.

For the top level of a hierarchy to appear in a report, the value must
appear in the child data, and the corresponding row in the parent data
must be empty.

238

Crystal Reports 2008 SP3 User's Guide

Sorting, Grouping, and Totaling

10

Grouping data

Advertising