How to reset running total after group change?

Stimulsoft Reports.NET discussion
Post Reply
stvhui
Posts: 51
Joined: Wed Apr 22, 2009 3:12 am

How to reset running total after group change?

Post by stvhui »

Hello to you,

group_code item_code amount running amount
A 3 30 30
A 2 20 50
A 1 10 60
Sub total 60

B 2 200 260 ---> should be 200
B 1 100 360 ---> should be 300
Sub total 300

I included above case in attachment, data (in ms-access), report (in mrt) and report output (in pdf)

Please help and thanks in advance.

Regards,
Steven
Attachments
reportpack.zip
(42.55 KiB) Downloaded 351 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to reset running total after group change?

Post by Alex K. »

Hello,

Please try to use the following code in BeforePrint event of GroupHeaderBand1 component:
Text5_Sum.Reset();

Thank you.
stvhui
Posts: 51
Joined: Wed Apr 22, 2009 3:12 am

Re: How to reset running total after group change?

Post by stvhui »

Hello to you Aleksey,

It's long time not involved in using stimulsoft report.

Would mind to guide me, how to put the code as you shown.

Please guide step by step using my attached example.

Thanks in advance

Steven
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: How to reset running total after group change?

Post by Jan »

Hello Steven,

Please check attached image.

Please contact us if you need any help.

Thank you.
Attachments
Sample.png
Sample.png (259.08 KiB) Viewed 2520 times
stvhui
Posts: 51
Joined: Wed Apr 22, 2009 3:12 am

Re: How to reset running total after group change?

Post by stvhui »

Hi Aleksey,

at the end, I solved it by your answer.

Thanks a lots

Regards,
Steven
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: How to reset running total after group change?

Post by Andrew »

Hello,

Great! Have a nice day.
Post Reply