How to add a footer row that displays the number of rows in a matrix in SQL Reporting Services?

My report has a matrix that displays a data set containing one row for each person in the company:

Company     Position   Name
-------     --------   -----
Acme Inc.   CEO        Bob
Acme Inc.   COO        Alice
Beta Corp.  CEO        Frank
Beta Corp.  CTO        Rob
Beta Corp.  COO        Bill
(etc)

The matrix has a column grouping for a position and a row grouping for a Company. The final report is as follows:

  Company        CEO      CTO     COO
-----------------------------------------
| Acme Inc.   |  Bob              Alice |
| Beta Corp   |  Frank    Rob     Bill  |
| Foo, Inc.   |           Paul          |
| Bar Corp    |  Mary                   |

I want to add a footer row to the bottom of the matrix, which counts how many managers, technical directors, etc. there is.

-------------------------------------
People in role | 3         2        2

SQL Reporting Services 2005? , Matrix SSRS 2005, , , . , , , Matrix, .

+3
3

"" "" " " → "".

​​ "" . totalm Title Column :

=COUNT(Fields!Name.Value)

, , .

SSRS 2008. SSRS 2005, №5 : http://www.simple-talk.com/sql/reporting-services/advanced-matrix-reporting-techniques/

+3

, ,

= (! IIF ( Name.Value < > "", 1,0))

Fields! Name - Matrix.


, ,

+2

Can I use the InScope function?

For instance,

=IIF(InScope("nameOfColumnGrouping"), Sum(yourField.Value), do something)

You may also need to specify the scope of the Sum function.

For instance,

=IIF(InScope("nameOfColumnGrouping"), Sum(yourField.Value,"datasetName/groupName"), do something)

Hope this help!

+1
source

Source: https://habr.com/ru/post/1792295/


All Articles