Interactive Sorting in SSRS

Interactive Sorting in SSRS

1. First of all go to visual studio 2010 and open your sql report project. Now in your Solution Explorer, Right click on Reports Folder and Add new Report.

Interactive Sorting in SSRS-1

2. A Report Wizard window pos-up.

Interactive Sorting in SSRS-2

Then click on Next Button.

3. Then select shared data source which we created earlier. If shared datasource not available than create it as describe in following link :

http://bhushan.extreme-advice.com/create-shared-data-source-in-ssrs

Interactive Sorting in SSRS-3

Then click on Next Button.

4. Now enter your query in Query String otherwise you can also build your query with Query Builder:

Interactive Sorting in SSRS-4

In this report we use following query :

SELECT	    FirstName +' ' + LastName AS Name, PhoneNumber
FROM		Person.Person
INNER JOIN	Person.PersonPhone 
	        ON Person.Person.BusinessEntityID = Person.PersonPhone.BusinessEntityID
WHERE		PhoneNumberTypeID = 1

Then click on Next button.

5. Now select Tabular Report from Report Type. After that click on next button.Then Add Name and PhoneNumber fields in Details Section.

Interactive Sorting in SSRS-5

6. Then click on Next Button. After that select table style whatever you want.In next screen you will see summary of report.

Interactive Sorting in SSRS-6

7. Then click on Finish Button.So now your Report Design will look like below:

Interactive Sorting in SSRS-7

8. Now we are going to add feature of interactive sorting on both columns.For sorting right click on the Textbox of Name and select Textbox Properties from the context menu.

Interactive Sorting in SSRS-8

9. A Textbox Properties window pop-up.In that select Interactive Sorting from Left Pane.

Interactive Sorting in SSRS-9

10. After that checked option of Enable interactive sorting on this text box.Then select [Name]  from the dropdown list of Sort by.

Interactive Sorting in SSRS-10

11. Then repeat 8,9 and 10 steps for phonenumber also.For sorting on phonenumber select [PhoneNumber] from the drop-down list of Sort by.

After that click on Preview Button of Report.

Interactive Sorting in SSRS-11

12. Now click on up down arrow which is on the right side of column.So your result will look like below:

Interactive Sorting in SSRS-12

13. Now again click on Up arrow of the column.so now your result will look like below:

Interactive Sorting in SSRS-13

Congratulations! Interactive Sorting in SSRS Report is completed.

 

6 thoughts on “Interactive Sorting in SSRS

Leave a Reply to 99Developers Cancel reply

Your email address will not be published. Required fields are marked *