PDF - Hiding Elements when Exporting
When exporting to PDF, developers commonly want to hide some of the elements in the report page, like the Export button or link. This can be done very easily using Show Modes.
Consider the example shown above. The definition, on the left, includes a button that can be clicked to export the report to a PDF. However, when it's exported, shown on the right, the Export to PDF button appears in the PDF itself. We don't want that button to appear in the PDF.
The first step in "hiding" the button in the export is to place the button beneath a Division element. This element supports Show Modes, which the button, by itself, does not. Set the Division element's Show Modes attribute value to an arbitrary string, such as "NoExport", as shown above.
Then set the Target.PDF element's Report Show Modes attribute value to an arbitrary string that does not match the string used in the previous step, as shown above.
When the report is run and exported, as shown above, the PDF no longer includes the Export to PDF button. Any element whose Show Modes attribute value does not match the Target.PDF element's Report Show Modes attribute will not appear in the export.