Ordering the Table Details
This document demonstrates how to enable interactive sorting with the Standalone Report Designer
or with the Visual Studio Report Designer
.
Prerequisites
To follow the steps in this guide, you need the following:
- A Telerik Reporting installation with an enabled Examples feature
- Microsoft SQL Server with AdventureWorks
Procedure
The following steps describe how to add an interactive sort button to a column header in the Detail Section of a report. This enables a user to click on the button and sort the table rows by the value displayed in that column.
-
Locate the
Product Catalog
sample report and open it with the Standalone Report Designer or with the Visual Studio Report Designer. Depending on the Report Designer of your choice, you will locate the Product Catalog sample report in one of the following folders:- Examples for the Standalone Report Designer -
%PROGRAMFILES(x86)%\Progress\Telerik Reporting {Version}\Report Designer\Examples
- Examples for the Visual Studio Report Designer –
%PROGRAMFILES(x86)%\Progress\Telerik Reporting {Version}\Examples\CSharp\
Replace {Version} in the Examples path with your Telerik Reporting version.
- Examples for the Standalone Report Designer -
In the Report Designer, make sure you use Design View.
- Select the List Price text box - this is the column header where we want to add an interactive sorting button.
- In the Properties window, open the Action editor.
- Select the Sorting action.
- Click the Select sort targets button. The Edit Sorting Action targets window appears.
- Click the New button to add a new target.
- Select table1 (Table) in the drop-down and click OK.
-
In the Sort expressions drop-down menu, select the field that corresponds to the column for which you are defining a sorting action. In this case, use the
=Fields.ListPrice
expression and click OK.Specifying a sort expression is required.
To verify the sorting action:
- Preview the report
- Navigate to Bikes in the document map.
- Click the List Price column interactive sorting button.