How to use the Cumulative Function in the Report Viewer

To show a running total in the Bold Reports® Report Viewer, use the cumulative function in a flat table, either as an expression or by setting the Cumulative custom property on a textbox. The cumulative function calculates the running total or cumulative sum of a sequence of numbers.

The cumulative function is available only for flat tables. You can achieve the cumulative function by either using an expression or assigning the Custom property. If the expression is used below the detailed row of the table, it will show the current page plus the previous page total. If it is used above the detailed row of the table, it will show the total of the previous page; in the case of the first page, the total will be 0.

How do I use the cumulative function in an expression?

To use the cumulative function in a Bold Reports® report expression, pass a numerical field of the dataset and the dataset scope name to the cumulative function.

Syntax:

=cumulative(numerical field of the dataset, dataset scope name)

Description:

Returns the total sum of the detailed rows rendered before.

How do I use the cumulative function with a custom property?

To use the cumulative function with a custom property in the Bold Reports® Report Viewer, assign the Custom property to the textbox Property Name: Cumulative and set the value to true.

What are the limitations of the cumulative function?

The Bold Reports® cumulative function has the following limitations:

  1. Can be used only in the flat tables.
  2. Cumulative expressions cannot be used within other expressions.