Search code examples
reportviewerrdlcrdlreport-viewer2010

Hide row if it is not on the first page


I want to hide a row of a table if it is not rendered on the first page of a report. The table (tablix) is in the header nor in the footer area.

I have tried to set an expression for the RowVisibility-property, something like:

(hidden) =Globals!PageNumber<>1

however, this leads to an exception saying that the PageNumber can only be used from within the header or the footer area.

Is there a possibility to check (in an expression) if an element is located on the first page of a report?


Solution

  • Not a precise answer to my question, but maybe it helps someone with a similar issue:

    • For the tablix activate the repeat row header option
    • In the advance row group options, activate the option RepeatOnNewPage
    • For the rows that should not be shown on the next page, disable the option KeepWithGroup

    I don't understand why I can not set RepeatOnNewPage only for some but not for all rows, but with the KeepWithGroup option, it seems to work like I desired.

    If someone has a more precise answer to my original question, please post it. I will the change the accept to your answer!