Report sum variable

Stimulsoft Reports.NET discussion
Post Reply
Nuria
Posts: 9
Joined: Wed Sep 27, 2017 2:27 pm

Report sum variable

Post by Nuria »

Hi ,
I have a report that does not calculate well.

The variable TOTAL_IMPORTE represents the sum of ah_facturas.importe which is placed inside a databand.

Image

Image

The variable is in two places of the report but the calculations show them wrong when there is only one line left on the next page.

Image

Image

Image

The last row should not be added. What I do wrong?
Thanks in advance.
Attachments
VTA0140.mrt
(190.11 KiB) Downloaded 146 times
Post.docx
(249.4 KiB) Downloaded 170 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report sum variable

Post by HighAley »

Hello.

We can't reproduce the issue without your data.
We can only guess that the issue is because of the rendering process of the report.
Try to use the After Print method of the Data Band to calculate the sum.
If you still need our help, please, send sample data for your report.

Thank you.
Nuria
Posts: 9
Joined: Wed Sep 27, 2017 2:27 pm

Re: Report sum variable

Post by Nuria »

Hi !

I have send a sample report with test data.

Thanks & Regards
Attachments
Sample_report.zip
(484.67 KiB) Downloaded 128 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report sum variable

Post by HighAley »

Hello.

We have found a solution for you.
You could use the Totals.cSumRunning() and Totals.cSum() functions.
You event don't need to use the variable.
Please, look at the attached report template.

Thank you.
Attachments
sample.mrt
(37.63 KiB) Downloaded 252 times
Nuria
Posts: 9
Joined: Wed Sep 27, 2017 2:27 pm

Re: Report sum variable

Post by Nuria »

Hi !

It works !!

Thanks and regards.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Report sum variable

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Post Reply