Ordering the Crosstab Total
Prerequisites:
- Reporting installation with the Examples feature
- MS SQL server with AdventureWorks
The examples are located in (Replace: Reporting X with your installation version)
- Standalone Report Designer -
%PROGRAMFILES(x86)%\Reporting X\Report Designer\Examples
- Visual Studio Integrated Designer –
%PROGRAMFILES(x86)%\Reporting X\Examples\CSharp\
Add an interactive sorting button to crosstab total column header item (top-level static group) to enable interactive sort for column items that shows aggregated data (total) in the Crosstab.
- Open in report design view the Dashboard example report.
- In report design view, select the top crosstab, total column header textbox spLabelTotal to which we want to add an interactive sorting button.
- From Properties window open the Actions editor.
- Select Sorting option.
- Click Edit sort targets button to open Edit Sorting Action targets editor.
- Click New to add a new target.
- Select for target from the drop down a dynamic row group over which data you want to apply sorting. In this case this is the SalesPersonFullName table group.
- Click OK.
- In the Sort expressions use the same aggregating expression as the one used in the items you want to sort. For this example, use the
=Sum(Fields.LineTotal)
expresion. Specifying a sort expression is required. - Click OK.
To verify the sorting action, preview the report, and then click the interactive sorting button.