Strange behavior of PageFooterBand

Stimulsoft Reports.NET discussion
Post Reply
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Strange behavior of PageFooterBand

Post by Jennypi »

Hi,

I have a variable that summarize what is displayed on each page of the report.
I would like this:
Page 1
A
B
==>Variable in pagefooter = "A - B"
Page 2
C
D
==>Variable in pagefooter = "C - D"
The problem is that "A - B" is not displayed on page 1 footer, but on page 2!

To calculate the variable I set the AfterPrint event of the databand to

Code: Select all

variable=variable+" - "+data.letter;
and the calculation seem to work well, but is displayed on the next page. I don't understand why.

Thank you for your help.

Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Strange behavior of PageFooterBand

Post by Alex K. »

Hello,

Please see a sample, how this can be realized using scriptis. In the nearest future we are planning to make improvements so it will be possible to do without additional code.

Thank you.
Attachments
733.GroupSumRunning.mrt
(14.62 KiB) Downloaded 307 times
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Strange behavior of PageFooterBand

Post by Jennypi »

Thanks for your reply, I will have a look.
Is your solution working with the old version of Stimulsoft Reports?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Strange behavior of PageFooterBand

Post by Alex K. »

Hello,

No. This should work on all versions of Stimulsoft.Reports.

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Strange behavior of PageFooterBand

Post by Jennypi »

Hi,

I had a look to your solution but I could not understand how it works, it is way far from my level of understanding. :)
Could you give me more explanations on what to do?
Or could I send you my report so you can have a look?

Thank you very much.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Strange behavior of PageFooterBand

Post by Andrew »

Hello,

Page Header and Footer are rendered before the page rendering, so that they display information on the start of a page, in other words data sources were not processed. To achieve the necessary result, in this example, we
(1) in the GetValue () event, of the required textbox (in the footer) remember it in instance in a variable, (2) in the second variable, processing data of the data band, we calculate the desired result, (3) and then, in the event AfterPrint of a page, write this value to the instanse of a textbox (in the footer).

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Strange behavior of PageFooterBand

Post by Jennypi »

OK now I understand.
Many thanks for your explanation Andrew, it is working perfectly!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Strange behavior of PageFooterBand

Post by Alex K. »

Hello,

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

Thank you.
Post Reply