Databases Reference
In-Depth Information
Sorting on Column Headers
Reporting Services for SQL Server 2000 doesn't include a specific feature for dynamic column sorting.
Using parameters and report items navigation actions, text boxes and images can be made to act like
hyperlinks that change parameter values, which may be used to change the sort order for a report or
report item. A built-in feature was added to Reporting Services for SQL Server 2005 that effectively uses
the same technique but manages everything internally. This feature does have its limits, though. I will
demonstrate both techniques so you can decide whether you can do it the easy way or venture outside
the box and be more creative.
Using the Interactive Sort Feature
This new feature in Reporting Services 2005 makes column sorting a snap. As you can see in Figure 7-48,
the text boxes in a table header may be used to create an interactive sort for the table. The settings are
fairly self-explanatory. Sorting may be set to the current group-level scope or a specific level can be spec-
ified. Using the Interactive Sort tab on the Textbox Properties dialog for each column header text box,
check the box to enable sorting and specify a field expression.
Figure 7-48
This is a very powerful feature with little design effort required. Figure 7-49 shows the report in preview
with interactive sort enabled for the first three column headers. Small up/down icons are displayed next
to each text box caption. This feature is simple but is limited to this view.
Search WWH ::




Custom Search