Data Region and Group Sorting


Data Region and Group Sorting

A designer can implement sorting for a group or a data region by providing one or many expressions for the Sorting property of each, as shown in Figure 12.3.

Figure 12.3. Sorting expressions.


Similar to data source sorting, an expression can, for example, sort by FirstName and LastName . Of course, fields used in expressions in this case will belong to the Fields collection. That is, the sorting expressions will have the form of =Fields!FirstName.Value and =Fields!LastName.Value . FirstName and LastName by default have the same name as fields retrieved by the data source (or database field names), but could be changed to different names . Similar to data source sorting, sort expressions can take advantage of parameters. For more details about parameters, including information on how to pass a parameter value to a report, refer to Chapter 10. The expression that incorporates parameters has a form of =Fields(Parameters!{ParameterName}.Value).Value. For example, if the parameter MySort is used, the expression will be =Fields(Parameters!MySort.Value).Value . In addition, expressions can include flow control functions, such as IIF() .

Sorting is performed in the scope where the sort is specified. For example, if you have a table that contains a group, sorting expressions specified for a table will not affect the data sort in the group.



Microsoft SQL Server 2005 Reporting Services
Microsoft SQL Server 2005 Reporting Services
ISBN: 0672327996
EAN: 2147483647
Year: 2004
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net