Reputation: 2535
I am using SQL Server Reporting Services 2008 to generate invoices. The user selects a batch and each invoice in the batch should print out 1 to a page. Each invoice should contain the summary of charges at the bottom, preferably in the footer to keep a consistent position.
Problem is, it won't allow me to put tables or subreports in the footer. All I can do is put text boxes, but the only data I can get in there are aggregates pertaining to my dataset as a whole. I can't get subtotals for just that invoice within the batch.
Basically my setup is a tablix that is grouped by invoice number with a page break between instances of the group. This ensures each invoice prints to its own page. But when I try to add a text box to the footer to subtotal THAT invoice, my only option seems to be First(Fields!SubTotal.Value, "DataSet") or some other aggregate. I need the subtotal for THAT invoice number whether it be the 1st or the 5th.
I don't know if I'm explaining this very well. I'm sorry if this doesn't make any sense.
Upvotes: 0
Views: 2261
Reputation: 23789
I suggest you change your approach a little bit:
Instead of adding a subtotal outside of the tablix, add a total to the bottom of the group. Insert additional lines in the group, but outside of the detail(or subgroup) rows that are repeating within the page.
Page footers aren't very tightly connected to the data or its layout, so they will be trickier to keep sub-totals within. If you really need to do it this way, then you'll need to keep a running total in some embedded code in the report. Start with this example and add additional code to zero out the running total at the beginning of each page.
Upvotes: 1