locked
how to decrease height of header at runtime RRS feed

  • Question

  • User-1617903758 posted

    I have a Report Viewer with Header.visible = true.

    on the Header, I have some control: textbox, label, PageNumber,... there is have 4 rows

    I want to show all control on header in first page and hide on next page and PageNumber show all pages. I use Expression to do this, but Height of header not decrease when controls which is hide (from 4 rows to 1 row, 1 row for show PageNumber) => How can I decrease header when control hide on next pages ? 

    thanks for any solution.

    Sunday, November 15, 2020 4:17 PM

All replies

  • User1535942433 posted

    Hi longson,

    As far as I think,when we design the report, page header width is fixed.So it will not be changed dynamically when running the report. To work around the issue, you can place page header content in proper tablix header, make the tablix header repeat on each page.

    More details,you could refer to below article:

    https://social.msdn.microsoft.com/Forums/office/en-US/ce725483-7535-4e65-ba3d-97bc3f2850bc/adjust-report-header-width-in-runtime-based-on-report-columns-in-ssrs?forum=sqlreportingservices

    Best regards,

    Yijing Sun

    Monday, November 16, 2020 7:13 AM
  • User-1617903758 posted

    Update: I was resolve this, because i put table in control LIST ITEM and set prop Keep together is true,  this make table break page. I was changed to false and It work for me.

    This is original template, with this design, It work OK but i dont want to show header since 2st page.

    --------------------------------------------------------------------------------------------------------------------------------------------------

    So that, I move all control on header to body like below image (except PageNum), i thought this is will work for me.

    But after i export to PDF file, the tablix which i use to show data from dataset It's break to next page, I had checked propertise all control is unchecked Allow Break Above or Below

    How can i resolve this, thanks you so much for your information Yij Sun

    Saturday, November 21, 2020 5:27 AM
  • User1535942433 posted

    Hi longson,

    Accroding to your description,do you set KeepTogether=true of the Row group Level (not the Tablix level)?

    Best regards,

    Yijing Sun

    Thursday, November 26, 2020 8:23 AM