Calculating totals
Calculating totals
Hello
Some time ago I wrote about a problem with calculating totals on a data band - the use of SumIf() function increased the height of the text component that contained the expression. See: http://forum.stimulsoft.com/viewtopic.php?f=12&t=35907. In one of the posts I was advised to use Totals.Sum(). That solves the problem with growing text components.
Now I have a new problem. I have a data band and I calculate the sum of values in one column. I do this using both Sum() and Totals.Sum() and I get two different results. Totals.Sum() does not compute the sum correctly.
I attach a sample project that reproduces the issue. I am using version 2013.1.
I have two questions:
1) why is the result of the calculation incorrect?
2) what is really the difference between Sum() and Totals.Sum()?
All your help will be greatly appreciated.
Some time ago I wrote about a problem with calculating totals on a data band - the use of SumIf() function increased the height of the text component that contained the expression. See: http://forum.stimulsoft.com/viewtopic.php?f=12&t=35907. In one of the posts I was advised to use Totals.Sum(). That solves the problem with growing text components.
Now I have a new problem. I have a data band and I calculate the sum of values in one column. I do this using both Sum() and Totals.Sum() and I get two different results. Totals.Sum() does not compute the sum correctly.
I attach a sample project that reproduces the issue. I am using version 2013.1.
I have two questions:
1) why is the result of the calculation incorrect?
2) what is really the difference between Sum() and Totals.Sum()?
All your help will be greatly appreciated.
- Attachments
-
- Report.mrt
- (9.68 KiB) Downloaded 468 times
-
- StimulsoftWpfApplication - totals.zip
- (1.75 MiB) Downloaded 252 times
Re: Calculating totals
Hello.
Sorry for delay with answer. We need some additional time.
Thank you.
Sorry for delay with answer. We need some additional time.
Thank you.
Re: Calculating totals
Hello.
We have fixed your issue. The patch will be available in our next prerelease build on April 26.
Thank you.
We have fixed your issue. The patch will be available in our next prerelease build on April 26.
Thank you.
Re: Calculating totals
Hello.
Thanks for the news.
I am glad the issue is fixed but I would still like to know the answer to my question: what is the difference between Sum() and Totals.Sum()?
Thanks for the news.
I am glad the issue is fixed but I would still like to know the answer to my question: what is the difference between Sum() and Totals.Sum()?
Re: Calculating totals
Hello,
The calculation totals in a report can be done by specifying an expression, for example, {Sum (DataBand1)}. These totals are calculated when rendering the report: each time when a single operation with the DataBand is done, a single value is calculated. All calculated values makes a total value, which will be displayed. In Stimulsoft Reports calculation of totals can be produced in another way - instantly. You should use the special Totals prefix. Calculation of totals occurs where the function is called, in contrast to standard results, calculations are performed while report rendering. Consider the calculation of totals in a report by the example of a report with grouping. Suppose there is a report with grouping.
http://admin.stimulsoft.com/Documentati ... sub=Totals
Thank you.
The calculation totals in a report can be done by specifying an expression, for example, {Sum (DataBand1)}. These totals are calculated when rendering the report: each time when a single operation with the DataBand is done, a single value is calculated. All calculated values makes a total value, which will be displayed. In Stimulsoft Reports calculation of totals can be produced in another way - instantly. You should use the special Totals prefix. Calculation of totals occurs where the function is called, in contrast to standard results, calculations are performed while report rendering. Consider the calculation of totals in a report by the example of a report with grouping. Suppose there is a report with grouping.
http://admin.stimulsoft.com/Documentati ... sub=Totals
Thank you.
Re: Calculating totals
Thank you for your reply, now I know everything I wanted to know.
Re: Calculating totals
Hello,
We are always glad to help you!
Let us know if you need any additional help.
Thank you.
We are always glad to help you!
Let us know if you need any additional help.
Thank you.