Calculate an Advanced Summary

This topic describes how to calculate an advanced summary (a summary that combines built-in summary functions with mathematical or logical functions).

The sample report calculates the bonus, which depends on the amount of sales. The bonus is 0.5% for sales over 200,000. For sales under 200,000, the bonus is 0.4% + 200.

  1. Start with the report created as described in the following topic: Calculate a Summary. The image below shows the report design area:

    Summary Report at Start

  2. Click the ellipsis next to the Expression editor in the summary label’s smart tag to invoke the Expression Editor dialog:

    Summary Expression Editor at Start

    Alternatively, you can click the f-button next to the control to invoke the Expression Editor dialog.

    The dialog allows you to specify an advanced summary that includes different summary, mathematical, and logical functions. For more information, review the following help topics:

  3. Enter the following formula in the dialog window:

    Iif(sumSum([ProductSales])>200000,sumSum([ProductSales])*0.005,sumSum([ProductSales])*0.004 + 200)

    Summary Expression Editor with Formula

    Click OK to close the editor.

  4. Change the format string for the summary label control and use the Properties dialog to change the ForeColor to Red:

    Summary Label Format String

  5. Click the Preview tab to see the resulting document:

    Resulting Document