This is a migrated thread and some comments may be shown as answers.

Show/Hide Page footer based on PageNumber

1 Answer 366 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Omikai
Top achievements
Rank 1
Veteran
Omikai asked on 27 Mar 2020, 10:07 AM

Hi,

I have a parameter that controls the visibility of page footer called "Show only page footer on the last page".

I also have a group footer on top of the page footer containing a HtmlTextBox with some custom footer texts, since the page footer can't grow during render it is placed in the group with PrintAtBottom set to true.

The group footer should also be hidden when page footer i hidden. It seems to work when i set the group footer to PrintOnEveryPage = false and when i set the GroupFooter.Visible = PageFooter.Visible inside of PageFooter_DataBound.

But,

This fails when i want to render multiple reports like 2 invoices and when the report engine renders a Empty page. Then i figured that is should control the visibilty of the "footers" by checking PageNumber = PageCount aswell but it looses the PageNumber and PageCount on this empty page. So i cant tell if it is the last page or not.

 

How to encounter this issue?

1 Answer, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 01 Apr 2020, 08:35 AM

Hello Omikai,

Test removing the empty page using the suggestions from Problem: Telerik Reporting renders blank pages kb article. I also recommend avoiding using events for changing the report's definition, more considerations on this subject can be found in Modifying or Creating a report at Run-Time kb article.

Instead of using events, test applying conditional formatting rules or bindings to hide the section based on a certain criteria.

 

Regards,
Katia
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
Omikai
Top achievements
Rank 1
Veteran
Answers by
Katia
Telerik team
Share this question
or