For a printable version of the Reporting topics, click here: http://ws4.insightdirect.com/Download/Website/docs/Crystal_Reports.pdf
Previous Topic: Running Totals Overview
To create a running total in Crystal Reports:
From the Design View page, right-click Running Total Fields and select New from the pop-up menu. The Create Running Total Field dialog box appears.
Type a name for the running total field in the Running Total Name field.
Select the field you want to total from the Available Tables and Fields list box.
Click . The field will appear in the Field to summarize field.
Select the type of running total you want to produce from the Type of summary drop-down list. Your options will vary depending on the field you chose to summarize.
In the Evaluate section of the dialog box, click the appropriate option button. Your options are:
For each record. The running total will run for every record.
On change of field. The running total will only run when a specified field has changed. Use the button to copy a field from the Available Tables and Fields list to the On change of field list.
On change of group. The running total will only run when a specified group has changed.
Use a formula. The running total will use the identified formula when performing its calculations. Click to create identify a formula.
In the Reset section of the dialog box, click the appropriate option button.
Never. This means that the running total will never reset; that is, the running total continues throughout the report. your running total will perform its calculations on that field throughout the entire report.
On change of field. Use the On change of field list to have your running total evaluate or reset when a designated field changes. Use the button to copy a field from the Available Tables and Fields list to the On change of field list.
On changing of group. The running total will run or reset when a designated group changes.
Use a formula. The running total will use a formula to determine when to reset. Click to create identify a formula.
Click OK to save the running total field. The program returns you to the Field Explorer dialog box.
Insert the running total field in the Details section of the report.
|
|
Note: |
The following list identifies the records that are included in the calculation when a running total is placed in the specified report sections. This list assumes the running total is not reset.
Report Header - only the first record in the report
Page Header - all records up to and including the first record on the current page
Group Header - all records up to and including the first record in the current group
Details - all records up to and including the current record
Group Footer - all records up to and including the last record in the current group
Page Footer - all records up to and including the last record on the current page
Report Footer - all records in the report
Next Topic: Data Sources Overview
Back to Reports Table of Contents