Rdlc: dynamically hide item in footer

499 views Asked by At

I want to hide or show certain controls in the page footer of a rdlc report based on what happens in the report. The body contains a couple of a tablixes and as soon as one of those tablixes is shown on a page I don not want to show certain controls in the page footer. I tried couple of things, like setting a shared variable using custom code and hide based on this variable, but it hides the controls on all page footers, instead of hiding them as soon as the tablix is on the page (when the variable is set).

1

There are 1 answers

0
InitK On

You can refer to report item from report body, like this:

ReportItems!myTextBox.Value

You may need to create some invisible textboxes in tables or in other area of the report body that would contain your visibility criteria.

The only catch is that you can refer to only one report item in your footer, so without knowing more about the logic of the report, it's hard to say if this would be sufficient. You may need to use table footer instead, for example.