Page 1 of 1

Strange behavior of PageFooterBand

Posted: Fri Dec 10, 2010 3:15 am
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.


Strange behavior of PageFooterBand

Posted: Fri Dec 10, 2010 8:31 am
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.

Strange behavior of PageFooterBand

Posted: Fri Dec 10, 2010 9:46 am
by Jennypi
Thanks for your reply, I will have a look.
Is your solution working with the old version of Stimulsoft Reports?

Strange behavior of PageFooterBand

Posted: Sun Dec 12, 2010 4:36 am
by Alex K.
Hello,

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

Thank you.

Strange behavior of PageFooterBand

Posted: Mon Dec 13, 2010 3:13 am
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.

Strange behavior of PageFooterBand

Posted: Tue Dec 14, 2010 2:53 pm
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.

Strange behavior of PageFooterBand

Posted: Wed Dec 15, 2010 3:47 am
by Jennypi
OK now I understand.
Many thanks for your explanation Andrew, it is working perfectly!

Strange behavior of PageFooterBand

Posted: Wed Dec 15, 2010 4:30 am
by Alex K.
Hello,

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

Thank you.