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.
Start with the report created as described in the following topic: Calculate a Summary. The image below shows the report design area:
Click the ellipsis next to the Expression editor in the summary label’s smart tag to invoke the Expression Editor dialog:
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:
Enter the following formula in the dialog window:
Iif(sumSum([ProductSales])>200000,sumSum([ProductSales])*0.005,sumSum([ProductSales])*0.004 + 200)
Click OK to close the editor.
Change the format string for the summary label control and use the Properties dialog to change the ForeColor to Red:
Click the Preview tab to see the resulting document: