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

How to use different top margin on each page of telerik report

3 Answers 432 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ankush
Top achievements
Rank 1
Ankush asked on 18 Jun 2019, 05:33 AM

I want to give top margin on each page except first page. How can I achieve this?

My current approach is that I gave top margin to PageHeader section and trying to hide PageHeader section on specific pages. But I failed because it hides PageHeader on all pages.

Please suggest.

Thanks

3 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 20 Jun 2019, 11:29 AM
Hello Ankush,

The PageSettings->Margins of the Report may be set with Bindings. However, the Page functions that may be used to determine page properties (e.g. PageNumber function for the current page) can be used only in the Page sections and are not available in the context of the Report. Hence, the Margins cannot be set directly depending on the page number.

If you don't need the PageHeader to display any information, you may use it to mimic Top Margin. Set its height to the desired margin and set its property PrintOnFirstPage to False to remove the PageHeader from the first page.
You may also use Bindings to show/hide the PageHeader based on the page number, for example with the following Expression that will hide the header for pages 1, 2, 4 and 5 :

Property path   |   Expression
Visible         |   = IIF(PageNumber In Array(1, 2, 4, 5), False, True)

Check the attached screenshot for clarity.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ankush
Top achievements
Rank 1
answered on 20 Jun 2019, 11:48 AM
But this approach doesn't remove PageHeader section space. Thats the main issue I'm facing.
0
Todor
Telerik team
answered on 20 Jun 2019, 01:19 PM
Hello Ankush,

I have attached a sample report and the generated PDF that demonstrate how the PageHeader may be used to simulate Top margin. Note that there is blank space (i.e. top margin) only in the pages specified in the Expression.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Ankush
Top achievements
Rank 1
Answers by
Todor
Telerik team
Ankush
Top achievements
Rank 1
Share this question
or