Sum of Databand print on next Site.

Stimulsoft Reports.NET discussion
Post Reply
Stephan1
Posts: 122
Joined: Fri Aug 31, 2007 7:22 am
Location: Germany

Sum of Databand print on next Site.

Post 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
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Sum of Databand print on next Site.

Post 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.
Attachments
32.RunningTotalsOnNextPage.mrt
(16.64 KiB) Downloaded 260 times
Stephan1
Posts: 122
Joined: Fri Aug 31, 2007 7:22 am
Location: Germany

Sum of Databand print on next Site.

Post 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
Stephan1
Posts: 122
Joined: Fri Aug 31, 2007 7:22 am
Location: Germany

Sum of Databand print on next Site.

Post by Stephan1 »

Anyway i got it working from your tips.

Thx alot.

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Sum of Databand print on next Site.

Post by Edward »

Let us know if any help is required.

Thank you.
Post Reply