Walkthrough: Grouping and Summary in Data Binding
This example is continued from the previous chapter, Adding Conditions to Data Binding.
1. Click ‘Next>>’ or select the Grouping & Summary tab.
2. Select ‘Customer.Company’ from the list of columns and click on the right-arrow to make this the first grouping column. For this example, follow the steps and add each group separately. If you Ctrl-click multiple columns in the ‘Available Columns’ panel and add them to the ‘Grouping’ panel simultaneously, you will create a composite grouping rather than the desired nested grouping.
3. Repeat the above to add ‘Product.Name’ below ‘Customer.Company’.
4. Move ‘TotalDiscount’ into the summary window.
5. Select ‘Product.Name’ in the ‘Grouping’ pane and click the Top N tab.
6. Select ‘Top’ from the drop-down list, enter “3” for the number of groups, and select ‘Sum(TotalDiscount)’ from the second list.
7. Click ‘Finish’ to complete the data binding.
8. Click ‘Preview’ in the Report Designer toolbar. When prompted, enter “10” for the ‘minimum order size’ filter parameter.
Notice how the data now displays only records with quantities greater than or equal to 10, and where the customer company was either Computer Tech or Eastern Data. Additionally, the data only displays records for the top three products based on summarized total.