How to make peer table inside a table group render on report dynamically

I have a table group with several peer tables. Is it possible to stop one of the peer tables from rendering based off a dynamic variable passed into the report? I can successfully make the peer table invisible but that page the peer table appears on still loads.

You need to make the nested table that drives the peer table return zero rows.

Currently I have a named query data source param_terms that grabs my data. I follow up with a script called script that checks if the peer is enabled or not (a report parameter tied to a session variable).

image

Here is script:

    terms_enabled = data['param_terms_enabled']
    if terms_enabled:
        pass
    else:
        data['param_terms'] = system.dataset.toDataSet([], [])

On the TableGroup I select the peer table called param_terms. It has a Key of param_terms.

This described setup right now shows either data from the named query or an empty dataset based off the session variable.

Can you explain where I need to go from here?

I don't know how to expand your case. What I do know is that table groups will completely omit (no blank space) inner tables/objects that do not have a row in their (nested) control data. You may need to restructure your data to do this.

Can you expand on "(nested) control data"? What does that mean? How can I generate nested control data today?

Table groups need nested data for full features. Your data isn't nested.

I followed along with your example and generated nested data but it doesn't seem to honor the Start on new page option. That is, if I have Start on new page selected I will always get the final page showing.

Is that behavior what you have seen before?

I haven't used "start on a new page".

1 Like