Original: ActiveReports Report application Tutorial (9)---Dynamic sorting of interactive reports
In addition to providing the ability to sort the data sources in ActiveReports, end-user sequencing is available, and end users can sort the report in-region and the entire data source, combined with data drillthrough, filtering, and more to make it easier for users to analyze report data.
1. Create a report file
Create a activereports report file in the application named RPTPRODUCTLISTFORSORT.RDLX, use the project template for the ActiveReports page report, and select Convert to continuous page layout from the Report menu item for VS when the creation is complete (CPL) Report to convert a pinned page report to a continuous page report.
2. Open Report Explorer and follow the information below to create a report data source
3. Add data sets
Right-click on the new Nwind_chs data source and select Add DataSet menu item
General-Name: Products
Query-query:
SELECT
Products. *, category. Category name, category. Description
From
Products
Innerjoin
Category
On
Product. Category ID = category. Category ID
By
Category. Category ID;
4. Design the report interface
From the Visual Studio Toolbox, add the Table control to the report design interface and drag the fields from the products dataset to the corresponding column in the table to get the following design interface:
5. Add dynamic sorting function to column header cells
Select the column header cell, click the Properties dialog box in the command area of the Properties dialog box to open the Text Box Property Settings dialog box, and set the following properties, respectively, in the interactive sort page:
6. Running the program
By running the program with the F5 key, there is a sort chart on the right side of each column header, and clicking on the sort chart enables you to sort the data:
Online demo and source code:
Http://www.gcpowertools.com.cn/products/activereports_demo.htm
ActiveReports Report Application Tutorials (9)---Dynamic sorting of interactive reports