Friday, February 21, 2014

Adding Sub-Report Sorting By Column

To allow sorting by column in a sub-report, add a Sort element to the desired Data Table Column element:

Figure 3.28: Definition Editor Panel after adding Sort element

Set the Data Column attribute to the column to sort by (i.e. OrderDate). In addition, when sorting non-character data, you should set the Data Type attribute to specify the type of data being sorted, in this case Dates.

Figure 3.29: Attributes Panel after setting Sort element attributes
In addition, in the Chapter3Report2 report definition, you need to change the Sub-Report  (sbrOrderDetails) element’s Sub-Report Mode attribute to “IncludeFrame”. 

Hint: The columns in a sub-report only support sorting whenever the Sub-Report element Sub-Report Mode attribute is set to a value of ‘IncludeFrame’. If the Sub-Report Mode attribute is set to a value of ‘Embedded’, then the sort elements are ignored. 


No comments:

Post a Comment