I've created completely dynamic reports using nested tables to match a set of nested data keys. For the parts of the report that I wanted to omit, I ensured the corresponding nested query returned no rows. Creating a such a nested data key via script is rather complicated, though. See this topic: