[Working with scripts]: MimeType Script

RenderIf based on MimeType

This is a sample that shows a different label when you choose to render in Excel output or PDF output.

The following script is added in at “RenderIf” of the Label.

=Code Snippet=
Renderer.getMimeType()=="application/vnd.ms-excel"

Similarly, this script can be used at RenderIf of a section, band, or component.