Totals for page + PrintOnPreviousPage

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

Totals for page + PrintOnPreviousPage

Post by kro »

Hello,

I have encountered a problem when trying to calculate page totals on a page that has PrintOnPreviousPage set to true. I attach a report that illustrates the problem, but let me explain it in detail.

I have two pages: the first one has some content (which is at the moment unimportant) and then there is the second one with a data band and a footer for this data band. In the footer there's a text field with the number of rows per page (calculated using cCount function). The footer has PrintOnAllPages set to true.

The second page has PrintOnPreviousPage set to true, so some of the content of the data band is printed on the first page, together with the footer (because it has PrintOnAllPages). And the problem: on the first page the footer shows the number of rows from the second page. The number is repeated on the second page, and after on every other page everything is OK.

I suppose that this is because the counting of rows starts on the page where the data band is actually placed - the second page in this case. My question is: is this how it is supposed to work, or is it a bug?
Attachments
PageTotals.mrt
(7.45 KiB) Downloaded 493 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Totals for page + PrintOnPreviousPage

Post by HighAley »

Hello.

Thank you for information.
We have reproduced the issue and need some time to solve it.
We'll let you know about the results.

Thank you.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Re: Totals for page + PrintOnPreviousPage

Post by Ivan »

Hello,

Due to some pecularity of the engine we cannot fix this issue.
As a workaround, instead of expression

Code: Select all

{cCount(DataBand1)}
please use the following expression:

Code: Select all

{Totals.cCount(DataBand1)}
Thank you.
kro
Posts: 27
Joined: Fri Oct 19, 2012 11:25 am

Re: Totals for page + PrintOnPreviousPage

Post by kro »

The workaround works fine. Thanks for your help.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Totals for page + PrintOnPreviousPage

Post by HighAley »

Hello.

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

Thank you.
Post Reply