Friday, February 21, 2014

Adding Report Sorting By Column

Sorting by the customer name was already supported by the report, but let’s add sorting by the order count, too. Add a Sort element to the desired Data Table Column element (“colOrderCount”), as shown below:

Figure 3.16: Definition Editor Panel after adding Sort element

Set its Data Column attribute to the column to sort by (i.e. OrderCount) and its Data Type attribute to specify numerical sorting, instead of alphabetic sorting (i.e. Number), as shown below:

Figure 3.17: Attributes Panel after setting the Data Column Sort element attributes
Hint: The columns in a sub-table don’t support sorting. Use a sub-report instead to allow sorting. 


Preview the report and you’ll see that you can now also sort it by the number of orders.


No comments:

Post a Comment