Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Sort report by totals -column

$
0
0

I've created an SSRS report in Report builder and I'm displaying it in SharePoint 2010.

What I would need to do is to sort according to my totals -column.

My report structure is as follows:

The first and column second columns are the ID and the name of a customer. There are over 35.000 consolidated customers in the database.

The third column is the column which I would like my report to be sorted upon. It gives the sum (Amount_EUR) of all different productlines sold to the customer.

The fourth column in this report design model is the product groups sold to that customer. There over twenty of product groups visible when Running the report.

This is what my report looks like when finished(you'd have to scroll a lot to the right if I took the whole of the report so I cut only a part of it to be visible, but I think you'll get the idea):

---

I tried to add a sorting option from the reports Tablix properties and adding this code as the sorting function:
=SUM(Fields!Amount_EUR.Value)
but I'm getting an error:  "A sort expression for the tablix 'Tablix1' includes an aggregate function.  Aggregate functions cannot be used in data row sort expressions."
Ok, so no aggregate functions aren't allowed to the sort.

If I just put:
=Fields!Amount_EUR.Value and sort by that from Z to A(biggest to largest) it doesn't have any effect. The report is still sorted alphabetically by the ParentID.

I've also tried some other code bits, but they all seem to be saying that I couldn't put an aggregate function into the sort expression....but my Total -column is already calculated with a Sum -function....

So, to my final question;
Is it possible sort my report based on that Total -column? If yes, how is that possible?

EDIT: I'm using SSRS 2008

Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>