Dynamically set PageHeaderSection height

6 posts, 0 answers
  1. Wayne
    Wayne avatar
    17 posts
    Member since:
    Jan 2011

    Posted 10 Jun 2012 Link to this post

    Hi,

    I have a standard report with: PageHeaderSection,  GroupHeaderSection -  DetailSection etc. My problem is the paper on which the report is being printed on, it may have a pre- printed Logo on the top. What I need is to dynamically set the page margin or better the PageHeaderSection height. But it seems this is not possible. Could you please give me a solution to this problem.

    Thank you and Kind regards
    Wayne

  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 14 Jun 2012 Link to this post

    Hello Wayne,

    Generally speaking the paging is the process of fitting as many as possible report items into a page. In order to do this first we have to define the available space for the content (the report items) on the page. The available space is usually calculated from the page size minus the page margins and the page sections. So your assumption is correct, it is not possible to have a dynamically sized page section for different pages of a single report. If the size would be different for the whole report, then you can change it through the PageSettings API.


    Kind regards,
    Steve
    the Telerik team

    BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

  3. DevCraft banner
  4. Michal
    Michal avatar
    8 posts
    Member since:
    Jun 2012

    Posted 15 Jun 2012 Link to this post

    Hi.
    I think I have similar issue - I need to hide some parts of the header depending on page number - lets say: show image on first page, hide it in second, show in third etc.

    After Your respond I assume that this is also not possible. Am I right or is there any way to achieve that?
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 15 Jun 2012 Link to this post

    Hi Michal,

    What you want is possible as you hide an item inside page section and do not change its size. You can use the built-in PageNumber and PageCount objects in a Bindings expression for the Visible property of that item e.g.:

    Property Path                                              Expression
    ========================================================
    Visible                                                  =IIF(PageNumber %2 = 0, true, false)

    Kind regards,
    Steve
    the Telerik team

    BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

  6. Einar Dahle
    Einar Dahle avatar
    10 posts
    Member since:
    Jun 2010

    Posted 11 Oct 2013 Link to this post

    then would it shrink back to fill the hidden space ?
  7. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 11 Oct 2013 Link to this post

    Hello Einar,

    Setting the page sections Visible properties causes the sections to be displayed or not. The occupied space would not shrink as explained in the Report Structure and Understanding Rendering Behaviors help articles.

    Regards,
    Stef
    Telerik

    Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

Back to Top
DevCraft banner