Class actuate.Viewer
The Viewer class represents a report viewer.
Member of: actuate.
Constructor Attributes | Constructor Name and Description |
---|---|
actuate.Viewer(container)
The Viewer class represents a report viewer.
|
Field Attributes | Field Name and Description |
---|---|
Request options
type{actuate.RequestOptions}
|
Method Attributes | Method Name and Description |
---|---|
disableIV(callback)
Disable the interactive viewing features.
|
|
downloadReport(format, pages)
Exports the report data to a given file format.
|
|
downloadResultSet(request, callback)
Downloads the result set from the given request
and passes it to the specified callback function.
|
|
enableIV(callback)
Enable the interactive viewing features.
|
|
Returns the current page content object.
|
|
Returns the current page number.
|
|
Returns the viewer height
|
|
getId()
Returns the id of this object.
|
|
Returns the iportal URL.
|
|
getLeft()
Returns the viewer left margin
|
|
Returns the viewer CSS position attribute.
|
|
Returns the current bookmark name of the reportlet to be shown.
|
|
Returns the report file name.
|
|
Returns the request options.
|
|
getTop()
Returns the viewer top margin
|
|
Returns the total page count.
|
|
Sets features availability.
|
|
<static> |
getViewer(bookmark)
Returns a viewer instance containing the given bookmark element.
|
getWidth()
Returns the viewer width
|
|
gotoBookmark(bookmark)
Makes the viewer jump to the specified bookmark.
|
|
gotoPage(pageNum)
Switches the page displayed in the viewer.
|
|
Determines whether the viewer is in interactive mode.
|
|
registerEventHandler(viewerEvent, handler)
Registers an event listener.
|
|
removeEventHandler(viewerEvent, handler)
Removes an event listener.
|
|
saveReportDesign(fileName, optional)
Saves the current view as a report design.
|
|
saveReportDocument(fileName, optional)
Saves the current view as a report document.
|
|
setContentMargin(margin)
Sets the viewer conent margin.
|
|
setHeight(height)
Sets the viewer height.
|
|
setLeft(left)
Sets the viewer left margin.
|
|
setParameters(params)
Sets the report parameters, from an actuate.Parameter.ParameterValue Array
|
|
setParameterValues(params)
Sets the report parameters, from an actuate.Parameter.ParameterValue Array
|
|
setPosition(position)
Sets the viewer CSS position attribute.
|
|
setReportletBookmark(bookmark)
Sets the bookmark name for reportlet rendering.
|
|
setReportName(reportName)
Sets the report file name to display, which can be either a report
design file or a report document file.
|
|
setService(iportalUrl, requestOptions)
Sets the iportal URL and an optional request options.
|
|
setSupportSVG(svgFlag)
Sets whether the client browser supports SVG.
|
|
setTop(top)
Sets the viewer top margin.
|
|
setUIOptions(options)
Sets features availability.
|
|
setWidth(width)
Sets the viewer width.
|
|
Shows the export report dialog.
|
|
Shows the export data dialog.
|
|
Shows the print dialog.
|
|
submit(callback)
Updates/reloads the viewer in the container.
|
Class Detail
actuate.Viewer(container)
The Viewer class represents a report viewer.
- Parameters:
- {String} container
- container object or name of a container in the current document
Field Detail
requestOptions
Request options
type{actuate.RequestOptions}
Method Detail
disableIV(callback)
Disable the interactive viewing features.
This is an asynchronous operation, the callback will be called once the
operation is finished.
- Parameters:
- {Function} callback
- callback to be called once the operation is
finished. The callback takes the following arguments:
- actuate.Viewer: current viewer
downloadReport(format, pages)
Exports the report data to a given file format.
- Parameters:
- {String} format
- export format, like "pdf", "xls"
- {String} pages
- page range, where the pages are separated by commas and ranges are separated by a minux sign. Example: "1,3-5,7" to select the pages 1,3,4,5 and 7.
downloadResultSet(request, callback)
Downloads the result set from the given request
and passes it to the specified callback function.
- Parameters:
- {actuate.data.Request} request
- Request object
- {Function} callback
- callback which takes the following
arguments:
- actuate.data.ResultSet: result set
enableIV(callback)
Enable the interactive viewing features.
This is mandatory to be able to use the page content.
This is an asynchronous operation, the callback will be called once the
operation is finished.
- Parameters:
- {Function} callback
- callback to be called once the operation is
finished. The callback takes the following arguments:
- actuate.Viewer: current viewer
{actuate.viewer.PageContent} getCurrentPageContent()
Returns the current page content object.
- Returns:
- {actuate.viewer.PageContent} instance of PageContent
{int} getCurrentPageNum()
Returns the current page number.
- Returns:
- {int} current page number
{String} getHeight()
Returns the viewer height
- Returns:
- {String} height
{String} getId()
Returns the id of this object.
- Returns:
- {String}
{String} getIportalUrl()
Returns the iportal URL.
- Returns:
- {String} iportalUrl
{String} getLeft()
Returns the viewer left margin
- Returns:
- {String} left
{String} getPosition()
Returns the viewer CSS position attribute.
- Returns:
- {String} position CSS position attribute
{String} getReportletBookmark()
Returns the current bookmark name of the reportlet to be shown.
- Returns:
- {String} bookmark
{String} getReportName()
Returns the report file name.
- Returns:
- {String} report file name
{actuate.RequestOptions} getRequestOptions()
Returns the request options.
- Returns:
- {actuate.RequestOptions} request options
{String} getTop()
Returns the viewer top margin
- Returns:
- {String} top
{int} getTotalPageCount()
Returns the total page count.
- Returns:
- {int} totalPageCount total page count
{actuate.viewer.UIOptions} getUIOptions()
Sets features availability.
- Returns:
- {actuate.viewer.UIOptions} options UI options object
<static>
{actuate.Viewer} getViewer(bookmark)
Returns a viewer instance containing the given bookmark element.
- Parameters:
- {String} bookmark
- name of the bookmark within the viewer to retrieve
- Returns:
- {actuate.Viewer} instance or null if no viewer was found
{String} getWidth()
Returns the viewer width
- Returns:
- {String} width
gotoBookmark(bookmark)
Makes the viewer jump to the specified bookmark.
If the page changes, a CONTENT_CHANGED event will be fired.
- Parameters:
- {String} bookmark
- bookmark name
gotoPage(pageNum)
Switches the page displayed in the viewer.
Once the page has switched, a CONTENT_CHANGED event will be fired.
- Parameters:
- {int} pageNum
- page number, starting at 1
{boolean} isInteractive()
Determines whether the viewer is in interactive mode.
- Returns:
- {boolean}
true
if the viewer is in interactive mode,false
otherwise
registerEventHandler(viewerEvent, handler)
Registers an event listener.
- Parameters:
- {String} viewerEvent
- viewer event string
- {Function} handler
- event handler function
- Throws:
- {actuate.viewer.ViewerException}
- if invalid arguments have been passed.
removeEventHandler(viewerEvent, handler)
Removes an event listener.
- Parameters:
- {String} viewerEvent
- viewer event string
- {Function} handler
- event handler function
- Throws:
- {actuate.viewer.ViewerException}
- if invalid arguments have been passed.
saveReportDesign(fileName, optional)
Saves the current view as a report design.
- Parameters:
- {String} fileName
- or null to use the current file name The file name must be a path relative to the viewer's repository.
- {Function} optional
- callback that is called once the
file has been saved. The callback takes the following arguments:
- actuate.Viewer: current viewer
saveReportDocument(fileName, optional)
Saves the current view as a report document.
- Parameters:
- {String} fileName
- or null to use the current file name. The file name must be a path relative to the viewer's repository.
- {Function} optional
- callback that is called once the
file has been saved. The callback takes the following arguments:
- actuate.Viewer: current viewer
setContentMargin(margin)
Sets the viewer conent margin.
- Parameters:
- {String} margin
setHeight(height)
Sets the viewer height.
- Parameters:
- {String} height
setLeft(left)
Sets the viewer left margin.
- Parameters:
- {String} left
setParameters(params)
Sets the report parameters, from an actuate.Parameter.ParameterValue Array
- Parameters:
- {Object} params
- parameter name value pair Array
setParameterValues(params)
Sets the report parameters, from an actuate.Parameter.ParameterValue Array
- Parameters:
- {Array} params
- actuate.Parameter.ParameterValue Array
setPosition(position)
Sets the viewer CSS position attribute.
- Parameters:
- {String} position
- CSS position attribute
setReportletBookmark(bookmark)
Sets the bookmark name for reportlet rendering.
- Parameters:
- {String} bookmark
- bookmark id used to render reportlet
setReportName(reportName)
Sets the report file name to display, which can be either a report
design file or a report document file.
- Parameters:
- {String} reportName
- report file
setService(iportalUrl, requestOptions)
Sets the iportal URL and an optional request options.
- Parameters:
- {String} iportalUrl
- iportal URL
- {actuate.RequestOptions} requestOptions
- optional request options
setSupportSVG(svgFlag)
Sets whether the client browser supports SVG.
- Parameters:
- {boolean} svgFlag
- SVG support flag
setTop(top)
Sets the viewer top margin.
- Parameters:
- {String} top
setUIOptions(options)
Sets features availability.
- Parameters:
- {actuate.viewer.UIOptions} options
- UI options object
setWidth(width)
Sets the viewer width.
- Parameters:
- {String} width
showDownloadReportDialog()
Shows the export report dialog.
showDownloadResultSetDialog()
Shows the export data dialog.
showPrintDialog()
Shows the print dialog.
submit(callback)
Updates/reloads the viewer in the container.
Throws an exception if a previous operation started with submit()
is still pending.
If the viewer content is changed, a CONTENT_CHANGED event will be fired.
- Parameters:
- {Function} callback
- optional callback function.
The callback takes the following arguments:
- actuate.Viewer: current viewer