<< Click to Display Table of Contents >> Navigation: User Interface Reference > Report Designer > Report Designer for WinForms > Create Reports > Miscellaneous > Calculate an Aggregate Function |
Interface Elements for Desktop > Report Designer > Report Designer for WinForms > Create Reports > Miscellaneous Report Management Capabilities > Calculate an Aggregate Function
This tutorial describes the steps required to create a report with an aggregate function. In this example, products that are not discontinued and have a total unit value greater than $500 will be displayed.
•Create a table report with a layout similar to that appearing in the following illustration.
•Create a new calculated field and set the field name to "AggregateField".
•Click the ellipsis button in the Expression section. The Expression Editor dialog will appear.
•In this dialog, double click the [CategoriesProducts] field, then choose Functions | Aggregate. Next, double click the Count() function. Insert the following text into the empty square brackets.
"Not[Discontinued]And[UnitTotal] >= 500".
Click OK to close the dialog and save the expression.
•Next, add three Labels to the Detail Band and customize their content, as shown in the following image.
The report is now ready. Switch to the Preview Tab, and view the result.
You can also set formatting rules for the report. The following image shows the sample report. The data rows that are not discontinued and have a total unit value greater than $500 are highlighted in red.
Add Calculated Fields to a Report
Sort Groups by a Summary Function Result
Copyright (c) 1998-2016 Developer Express Inc. All rights reserved.
Send Feedback on this topic to DevExpress.