I have a table which gets populated, depending on a report value.
If the value is not correct the table\panel is hidden. It is in the table of contents, and when hidden still shows up in the table, however has a page number of 0 and clicking on the row causes an error to display.
In this case I would suggest to apply the same expression that controls the table visibility, to the TocText property and return null if the item will be invisible. This will remove it from the table of contents and the user will not be able to click on it.
I've prepared an example .trdx report that demonstrates the above approach. The report consists of 3 tables and each table's visibility is controlled by two report parameters - one for the report group, which contains the table and one for visible/invisible state. Please take a look at the table's Bindings - there is the expression that sets the table's visibility. Identical expression is used to control the table's TocText property and it ensures that TOC items will be generated only for visible items.
I hope you will find the example useful.
Regards,
Ivan Hristov
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