Totals on a data band causing problems

Stimulsoft Reports.WPF discussion
Post Reply
kro
Posts: 27
Joined: Fri Oct 19, 2012 11:25 am

Totals on a data band causing problems

Post by kro »

Hello there.

I noticed a strange thing. I have two data bands: one with some data, the other one with a text component that contains the calculation of a sum. The band with the aggregate is above the band with the data.

The strange thing is that the text component with the sum is bigger (higher) than it is supposed to be, and when the sum includes a condition, it grows even bigger.

This is not a big problem: it all works fine if the text component has CanGrow set to false, or if it is placed on a header/footer band, or if the band is below the band with data - and there's probably more solutions. I am just curious to know why is this happening. Is this a bug?

Another strange thing is that I get 58 pages of output where there should be only 2 - and this seems like a bigger issue.

I'm uploading a zip file that contains sample reports and data. The file 'TotalsCausingTextToGrow.mrt' is the one that's causing problems. 'TotalsCausingTextToGrowFix.mrt' is an example of a solution. I am using version 2012.2.1400. I tried version 2013.1.1503 and the result was the same.
Attachments
TotalsOnDataBands.zip
(487.15 KiB) Downloaded 260 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Totals on a data band causing problems

Post by HighAley »

Hello.

This behaviour is connected with the using of Sum() function. It is calculated later and on rendering time the size is depends on a content of the text component.
The Text1 contains three rows of text and the Text3 contains five rows of text.
Sum.png
Sum.png (7.77 KiB) Viewed 2053 times
The Totals.Sum() function has different behaviour and the Height will not increase.
But there is no Totals.SumIf() function.

Thank you.
kro
Posts: 27
Joined: Fri Oct 19, 2012 11:25 am

Re: Totals on a data band causing problems

Post by kro »

That explains all. Thank you.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Totals on a data band causing problems

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Post Reply