Question

I am new to SSRS (2005) and am creating my first report. I need to create a group-based running value but is sorted or some other field. For example, from the data below

|Employee| Day |Hours|Salary|
|E1      | 1.1 |  5  |  5   |
|E2      | 1.2 |  6  |  6   |
|E3      | 1.3 |  7  |  7   |
|E2      | 2.1 |  6  |  12  |
|E1      | 2.2 |  5  |  10  |
|E3      | 2.3 |  7  |  14  |
|E3      | 3.1 |  7  |  21  |
|E2      | 3.2 |  6  |  18  |

I am calculating the salary to be a running value on hours grouped by employee, which works fine. The problem is I want the report to be sorted on the Day column. If I use the Day as a sorting criteria in the employee group, the report is grouped on the employee, but within the group, the data is sorted on the Day column.

Is there a way to build the report and then finally sort the report on the day column ? Please let me know in case I am unclear.

Was it helpful?

Solution

AFAIK this is not possible: you can't both group on one column (e.g. employee) and filter the entire table on a different column.

The only options I can see to get close to what you want:

  • Group on employee, create a running sum, and forget about sorting in SSRS. Sort in Excel after exporting the report..
  • Calculate the running total in the SQL query and make it a regular field. The report can now sort on day, and doesn't need to group anymore.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top