In this article
You can add scripting to text elements in Reportal . If you add scripting to a text element in the Report Master or a Page Master, then that scripting will be run on all the pages, in the same place on the page every time. This will avoid you having to repeat scripts on each page. To add script to a text element in the Report Master:
- In the Layout and Styles toolbox, double-click on the ReportMaster to open the Page Editor.
- Add a Text component to the appropriate place on the page, and save the changes.
- Right click on the Text element in the Report Master in the toolbox, and chose Script.
- Enter the desired script and click Save to save the changes.
A Component Script page opens.
For example, if you add the following script:
var output : String = "Scripting in the Report Master";
text.Output.Append(output);
then when you preview the report you will see the text "Scripting in the Report Master" on every page of the report in the location defined by the text element in the Report master.
Note that any scripting added to a Text element will over-write and replace all texts provided by the Titles fields in that text element. I.e. the scripting will take precedence.