reporting-services

SSRS - access column group values in row


I am working this SSRS report. This is a count of how many holidays staff have worked over a supplied date range. The report is "Row Grouped" with Officer name. It is also "Column Grouped" by calendar year.

The requirement is to fill officer name textbox (or the entire row) with another colour when the number of holiday worked is 2 or more per calendar year. I have done the expression on fill of the Officer name textbox: =IIf(CountRows() > 1, "Silver", "Default").

As you will see this fills the Officer name textbox based on the row count of the officer name group (total of holidays worked across the report date range). In the 3rd row for example, the total of count rows is 4 so it fill officer name textbox. However this is across 4 calendar years. The requirement is to only highlight when the row count per calendar year is 2 or more.

So I am trying to see if there is a way to find max of column group row count and use that in the row textbox.

Thanks


Solution

  • I tried to recreate something similar to your report.enter image description here

    My Count field is filled on the bases of the NET field from my database, Which is the difference of Debit and Credit fields. So I wrote an express to get 1 or 0 for count field.

    enter image description here

    And on the customer ID , for Font property add an expression like below

    enter image description here

    enter image description here

    If your count field is coming from your dataset then you can also use below, replace NET.Value with your field name

    =IIF(Sum(Fields!NET.Value) >1, "Blue", "Purple")