Footer Band Question

Stimulsoft Reports.NET discussion
Post Reply
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Footer Band Question

Post 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
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Footer Band Question

Post 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.
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Footer Band Question

Post 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
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Footer Band Question

Post 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.
Post Reply