Page 1 of 1

Sum of Databand print on next Site.

Posted: Thu Jan 31, 2008 6:28 am
by Stephan1
Hi,

i got a Datasource "Products" there are the products and prices saved.

Like:

Report Page 1

Name Count Price TotalPrice
Product A 1 10 10
Product B 5 20 100
Product C 8 30 240
_____
350

Pagebreak


Report Page 2

Summ of last Page 350

Name Count Price TotalPrice
Product D 3 30 90
Product E 4 20 80

..
..


How can i calc a Summ of the Total Field printed on one Page, and display it as total on the next page ?.

Its a Invoice Report with lots of products so people wanna see the calculated Summ of First PAge on the next and so on.


Thx alot

Stephan

Sum of Databand print on next Site.

Posted: Fri Feb 01, 2008 5:58 am
by Edward
In that case a good idea of using a variable for calculation of the required sums in the BeforePrint Event of the DataBand. This variable must be declared in the report Dictionary.

In the BeginRender event of the report the variable must be reset, because report may has more than one pass.

Please see the report in the attachment. As usual it could be opened in the Demo.exe sample application from the standard delivery.

Thank you.

Sum of Databand print on next Site.

Posted: Mon Feb 04, 2008 4:07 am
by Stephan1
Thx Edward,

your example Report shows no Data. Is that normal ?. There is no Data included i guess. and its a MRT file no mdc, mdz.



Thx for helping

Sum of Databand print on next Site.

Posted: Mon Feb 04, 2008 5:11 am
by Stephan1
Anyway i got it working from your tips.

Thx alot.


Sum of Databand print on next Site.

Posted: Tue Feb 05, 2008 3:42 am
by Edward
Let us know if any help is required.

Thank you.