ARTICLE

Implement Sorting in Reports using Report Viewer

Posted by Mahesh Chand Articles | Reports in VB.NET May 10, 2007
This article shows how to implement sorting on columns in a report using Report Viewer.
Download Files:
 
Reader Level:

I have a Report with three columns - Name, Age, and Phone; I created using Reports Viewer in Visual Studio 2005, which looks like Figure 1.



Figure 1.  

See Reporting Services section to learn how to create reports using Reports Viewer. OR download the attached source code. 

Now I am going to implement sorting on Name, Age, and Phone columns.

Right click on the Name column, select Properties menu and click on Interactive Sort tab on the TextBox Properties dialog. Check Add an Interactive sort action to this textbox checkbox as shown in Figure 2. Select the field name, which you want this column to sort data on and click OK button.

 

Figure 2.

Now if you run the report, you will see little sort icons next to the column name and clicking on this icon will sort the data. See Figure 3.



Figure 3.

You can add sorting to rest of the columns in same way.

share this article :
post comment
 

Its a very good artical

Posted by pradip rathod Feb 24, 2009
Team Foundation Server Hosting
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Diagram
Become a Sponsor