ReportColSum()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

ReportColSum()

Syntax

ReportColSum( <StartingColumn>, <EndingColumn> )

 

Purpose

To acquire the sum of the values of one or more numeric report columns during the printing of a report.

 

Parameters

<StartingColumn> is the starting column number for the range of numeric report columns to sum during the printing of a report.

 

<EndingColumn> is the ending column number for the range of numeric report columns to sum during the printing of a report.

 

Returns

The sum of the range of numeric report columns from <StartingColumn> through <EndingColumn>.

 

Usage

This is a very powerful feature of the report writer. It allows you to sum across report columns during the printing of a report. This capability is very similar to that of spreadsheet programs which allow you to define summation formulas that draw on a range of "cells". In DonorQuest, report columns can be thought of as "cells".

 

In the report writer, the column number for each field expression is shown to the left of the field expression (see figure 13.6 of section thirteen). This is the number you must use with the ReportColSum() function when referencing the value of a column in the report.

 

NOTE: The ReportColSum() function will only work with report columns of numeric type.

 

Example

The following examples draw on a hypothetical report of four columns containing each donor's first name, last name, donation total for current year, and donation total for last year:

 

CALL

RESULT

ReportCol( 1 )

John

ReportCol( 2 )

Smith

ReportCol( 3 )

250.00

ReportCol( 4 )

1500.00

ReportColSum( 3, 4 )

1750.00

 

See Also:

ReportCol(), ReportLine(), ReportPage()