Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS - Sort table based on column value

I am trying to sort the following table:

hYear            hSale
------------------------------------
[year]    =Count(Fields!sale.Value)

The table only has one row group (year) and no column group. I'd like to:

-initially sort the table based on the calculated value; is it possible?

-add interactive sort to calculated column based on the value. I assume I should sort 'Detail rows', but what will be the sort expression?

like image 976
Ehsan Avatar asked Jun 28 '13 17:06

Ehsan


People also ask

How do I sort a table in SSRS?

In a table or matrix in report design view, right-click the text box in the column header for the group to which you want to add an interactive sort button, and then click Text Box Properties. Click Interactive Sorting. Select Enable interactive sorting on this text box. In Choose what to sort, click Groups.

What is interactive sorting in SSRS?

Interactive sorting can be used to enable a user to toggle between ascending and descending order for rows in a table or for rows and columns in a matrix. In Bold Report Designer, you can configure interactive sorting for cells of a table or matrix using the User Sort property listed in tablix cell properties.


1 Answers

Yes on both:

  1. Click on the table or grid to make little gray boxes appear. Click in the upper left corner and select properties. Select Sorting. Hit the 'Fx' button. Put in your expression you have above.

  2. For dynamic sorting select the cell in a table (not the header) and click 'Text Box Properties. Select 'Interactive Sorting' and select 'Enable interactive sorting on this text box'. Put in your dataset column or else a custom expression like what you did above.

like image 55
djangojazz Avatar answered Nov 18 '22 19:11

djangojazz