Viewer APIs
Learn about Viewer API to control the OZ viewer in the application. Viewer API consists of viewer parameters, functions, and events.
Viewer Integration
Example: Hide toolbar

Key Viewer Functions
sendToActionScript()
Initialize Viewer environments and set viewer feature options.
Setting Viewer parameters in OZR (OnStartUp of the ReportTemplate)
At design time
When the parameter option values never change
Setting Viewer parameters in HTML (sendToActionScript())
At runtime
When parameter option values change by condition (user, device, business rule)
Settings in OZR take precedence over settings in HTML.
When the same parameter was given in both the OZR and HTML with different values,
the value given in the OZR overrides the one in HTML.
Importing external JS and OZR - Example
Script()
Run an OZ viewer toolbar command without parameter values
Viewer functions are methods of the Viewer object which is referenced by the div id OZViewer in this example.
ScriptEx()
Run an OZ viewer toolbar command with parameter values
GetInformation()
Get various information on the OZR from the viewer such as datasets, parameters, input data, page index, number of pages, etc.
Key Viewer Events
OZEFormInputEventCommand
The application can catch input events sent π from the Viewer.
Set the eform.inputeventcommand option to true.
Event function names end with the postfix - the div id OZViewer.
OZUserEvent
The application can catch user-defined events sent π from the Viewer.
TriggerExternalEvent
The application can send events π to the Viewer (trigger external events of the OZR).
Set the eform.inputeventcommand option to true
Last updated
Was this helpful?