开发者

Subtotals in RDLC report

开发者 https://www.devze.com 2023-03-07 02:05 出处:网络
I need to display subtotals in RDLC reports. My report should display data like this: BookStudentBorrowed

I need to display subtotals in RDLC reports. My report should display data like this:

Book            Student           Borrowed
Book1           John              2
Book1           Mary              3
Book1           Bob               1

                Total:            6 --how to do it?

Book2           Alex              1
Book2           John              7
Book2           Dan               2
                Total:            10 --how to do it?

Grand Total:                      16

As you see, I have the data grouped by BookName and StudentName. The last column sh开发者_Go百科ows how many times the student borrowed that book last year. Basically implementing the Grand Total is piece of cake but I can't seem to be able to define a subtotal for each book.

Thanks.


You need to add a group around the details section of the report and group on the book name - you can then add a total in the group footer. In your example, wouldn't you have separate groups for each of Book2, Book3 and Book4?


If you are using a table or matrix, i assume you put that in a list and set the list to group by book-name. That way, what actually happens is that a new table or matrix is generated for each book-name. If you are using a matrix, to have a subtotal is as simple as right clicking on the matrix detail's first cell and specifying SUBTOTAL in the menu. With a table, go to the footer and specify sum using RunningValue

0

精彩评论

暂无评论...
验证码 换一张
取 消