Hiding bands at runtime

Category

Rave - Mirrors

Question

I have a band that, depending on the situration, I need to hide when printing the report. How do I do that?

Solution

Conditional hiding of bands can be accomplished through the use of data mirrors. Drop down a couple of sections on a global page or second report page and place all of your components that need to be printed in the first section. The second section is left blank and its height is set to zero. Then on your main report page you drop down a DataMirrorSection component inside your band and set it up so that it either mirrors the empty section or the section with your components on it. Set the DataMirrorSection's height to zero and then based on a parameter or field in your database you mirror the appropriate section.