Adding totals to a published report saves users from having to count records or add data manually. The total for a given column might be a count of all the records listed; or it might be a sum of the data values shown in the specified column (referred to as count total and sum total respectively.)
We’re going to add some totals to the “Clients and Monthly Income” report referenced in the “Adding Click-Through Links” section, starting with a count total, and then a sum total.
1. Scroll down to the Links and Totals section and select the Calculate Totals box to bring the related fields into view.
2. The location for the total – ie: which report column will reflect the total – is determined by entering the number of the column. Report columns are numbered from left to right, starting at “1”. Enter the value “1” in the Count Columns field, to get a count of all the records returned:
3. Select the Preview button to preview the report; you’ll see a total count of all the records listed at the bottom of the report:
Close the query preview page to return to the query-building page; now we’ll add a sum total to the report.
4. Enter the value “4” in the Sum Columns field, since the monthly income that we want to sum is the fourth column in the report:
5. Select the Preview button to preview the report; you’ll see a sum total of the income amounts at the bottom of the fourth column:
Tip: you can specify more than one sum or count column using a comma-separated list with no spaces.
The Precision field in the Links and Totals section allows you to set the precision value for floating-point values. “Precision” refers to the floating-point precision to use in displaying totals, ie: how many digits appear after the decimal point. The number specified in the Precision field indicates the floating-point value that Pirouette will display.
The following list shows the various results you would get for a sum that shows up as 1.2858 based on the value entered in the Precision field:
Close the query preview page to return to the query-building page, and continue to “Publishing Custom Reports” to learn how to add your custom report to the “All Reports” list.