Navigation:  Customizing Print Templates > Editing a Print Template >

Simple Calculations

Print this Topic Previous pageReturn to chapter overviewNext page

 

Topic Level: Advanced Report Design

 

Simple calculations can be performed using a Database Calculated Field component (Data Components Toolbar).

 

Performs simple calculations without any coding
Provides Sum, Average, Minimum, Maximum and Count functions
Performs calculations that can be group-based or report-based

 

Count

To number the detail bands:

Place a DBCalc component in the detail band of a report.
Right-click over the component and select Calculations...
A dialog will be displayed.
Set the calculation type to Count and click OK.

 

When you return to the Report Designer, the DBCalc will contain this caption: 'Count(*)'. There is no need

to select an individual field for the DBCalc because the Count function does not require one.

 

Preview the report. Each detail band will be numbered.

 

Grand Total

To calculate a grand total:

Add a summary band (select Summary from the Report menu).
Place a DBCalc in the summary band.
Right-click over it and select 'Calculations'.
Select 'Sum'.
Assign the DBCalc to the appropriate data pipeline and field.

 

Group Total

To calculate group totals, place a DBCalc in the group footer band and assign it to the appropriate data pipeline and field. The Reset Group will be assigned automatically. 

 

Each time the group breaks, the group total will reset to 0.

 

Cumulative Sum

To calculate a cumulative sum in the detail band, add a DBCalc in the detail band and assign it to the appropriate data pipeline and field.

 

Look Ahead Total

To calculate group totals so that they can be displayed in the group header.

Create a group.
Place a DBCalc component in the group header band.
Right-click and set "Look Ahead" to True.
Preview. The total will print before the detail.

 

 


Page url: http://www.jadetools.com/jps/user_manual/HTML/index.html?calculations.htm