Little trick: Disable the hyperlink according to the output format

Tianli
edited July 28, 2021 in Analytics #1
This is a trick for user to hide or disable the hyperlink action according to the output format. In this example report we disable the label's URI hyperlink when the output format is xls. First in label's onRender get the output format by reportContext.getOutputFormat(), if it is equal to xls we set this label's action to null. The expected result is when exporting or preview the report in xls, the hyperlink should be disabled.