Page 1 of 1

Footer Band Question

Posted: Mon Dec 17, 2007 3:44 am
by EDV Gradl
I have a report with a data band and 3 footer bands. The Footer bands only print on the last page.

Sometimer there is so much data, that second page will be generated and on the page only the third footer band is printed.
So I get an almost empty page with just one footer.

Like this:

Page 1
data
data
data
...
data
data
footer 1
footer 2

page 2
footer 3

Which is quite a waste of paper. In this condition I would like to disable the footer 3 completely, but don't know how.

Is is possible to disable the printing of the footer band(s) conditional somehow?

Thanks a lot

Marco

Footer Band Question

Posted: Tue Dec 18, 2007 1:37 am
by Vital
You can use following code:

Code: Select all

StiPage renderedPage = this.RenderedPages[this.RenderedPages.Count - 1];
if (renderedPage.Components.Count == 1)this.RenderedPages.RemoveAt(this.RenderedPages.Count - 1);
Thank you.

Footer Band Question

Posted: Tue Dec 18, 2007 4:10 am
by EDV Gradl
Nice feature! :biggrin:

Can I use this inside the report or just in my printing routine before calling Print?

What happen to {TotalPages}. When I remove a second page via code, I just get one page with a Page 1 of 2 textbox.

Can I change to textbox somehow to page 1 of 1 ??

Thanks a lot!

Marco

Footer Band Question

Posted: Tue Dec 18, 2007 3:52 pm
by Vital
In this case you can use following code:

Code: Select all

StiPage renderedPage = this.RenderedPages[this.RenderedPages.Count - 1];
if (renderedPage.Components.Count == 1)Footer1.Enabled = false;
For also you need set property NumberOfPass of report to DoublePass.

Thank you.