Page 1 of 1
Running totals and carry overs
Posted: Sat Jul 21, 2007 5:31 am
by Peter Illes
Dear Edward & al.,
I have seen your reply to Robert (very informative as always, thanks!) but I have some additional questions.
I have to achieve the following: I'm implementing an invoicing app, where it is possible that an invoice is multiple pages long, and at the bottom of each page (except the last) I have to implement "carry over to next page" sums of net and gross amount, and on each page (except the first) I have to show the same values at the top as "carry over from previous page". The carry overs are not only the sums on that page, but the sums from the start of the item list to that point (all pages accumulated thus far).
So indeed, I could imagine some new bands called "dataPageEndBreak"/"dataPageStartBreak", that we could configure to achieve the above...
TIA,
Peter
Running totals and carry overs
Posted: Sat Jul 21, 2007 6:33 am
by Brendan
You could use the "Print On" property of the PageHeader and PageFooter Band
Add a Page Header to the report and set the "Print On" Property to "Except First Page"
Add a Page Footer to the report and set the "Print On" Property to "Except Last Page"
and use some local variables for the running totals
Running totals and carry overs
Posted: Mon Jul 23, 2007 7:29 am
by Guest
Also you can use the Footer and Header with options "Print On All Pages" = "True" and for Header "Print On" = "Except First Page" and for Footer "Print On" = "Except Last Page".
For sum you can define a variable, for example "sum", and on RenderingEvent of Data Band you must write: sum+= DataSource1.FieldSum
Thank you.
Running totals and carry overs
Posted: Mon Jul 23, 2007 3:59 pm
by Peter Illes
Brendan & Pavel, that is a good idea, thanks!
There are some additional considerations, though, like I need these bands only if the items list data band is breaking on the page (if other data bands break, then I don't have to provide it). If it breaks, then I also have to repeat the data band Header on the next page.
Running totals and carry overs
Posted: Thu Jul 26, 2007 9:13 am
by Guest
Unfortunately, we couldn't find solution for you. We tried many variants and all of them don't bring to success.
Thank you.
Running totals and carry overs
Posted: Fri May 23, 2008 2:01 am
by grazi
Hello Guys,
i have a similar issue, so i tried to put the carry over in the footer. However, it seems like the footer is being rendered before the carry overs for the page are calculated, so i have the results of one page on the next page. Do you know if there's a way to set the render order of the elements?
Running totals and carry overs
Posted: Fri May 23, 2008 5:47 am
by Edward
If next page must contain the sum from previous page, then you need add variables in your report.
In the AfterPrintEvent of the page header this sum should be reset:
SumOnPreviousPage = 0;
This textbox on the Pageheader must have 'PrintOn' property set in 'Except First Page'.
Value for this textbox can be calculated in the BeforePrintEvent of the DataBand.
Please open the attached report in the Demo sample application from the standard installation of Stimulsoft Reports.Net.
Thank you.
Running totals and carry overs
Posted: Fri May 23, 2008 7:33 am
by grazi
thanks for the example and the quick reply, everything seems to work so far
Running totals and carry overs
Posted: Fri May 23, 2008 8:09 am
by Edward
Please let us know if any help is required.
Thank you.