String. The value of the ID parameter for an HTML <div> element to hold the xTabAnalyzer viewer. For example, with 'containerName' as the xtabContainer parameter, a <DIV ID='containerName' /> tag on the page displays the viewer at the location of the <div> element.
Table 5-2 lists actuate.XTabAnalyzer functions.
Commits all design changes to a generated document as a single operation. If ivMode is not set to true, call setIVMode( ) to set the value of ivMode to true before calling commit( ).
var content = analyzerViewer.getCurrentPageContent
( );
return content.getCrosstabByBookmark
( );
return analyzerViewer.getCurrentPageNum
( );
return analyzerViewer.getGadgetId
( );
var height = viewer.getHeight
( );
viewer.setHeight(height * 2);
This example retrieves the position of the viewer’s left margin and moves the margin 20 pixels to the right if the left margin is fewer than 45 pixels from the left edge of the screen:
var left = viewer.getLeft
( );
viewer.setLeft(left + 20);
if (viewer.getPosition( ) == 'relative'){
viewer.setPosition('absolute');
This example retrieves the value for the viewer’s top margin and moves the margin 20 pixels down the screen if the margin was fewer than 45 pixels from the top of the screen:
var top = viewer.getTop
( );
var options = viewer.getUIOptions
( );
options.enableToolbar(false);
viewer.setUIOptions(options);
Returns a viewer by container. To retrieve the viewer for the current object, do not specify a container. This function is useful to retrieve the instance ID for a specific viewer when there are multiple viewers on a page.
return viewer.getViewer
( );
var width = viewer.getWidth
( );
viewer.setWidth(width * 2);
This example retrieves the bookmark that the cross tab is associated with, changes the bookmark, and resets the bookmark. This functionality supports the use of multiple cross tab elements within a single design.
var oldBookMark = viewer.getXTabBookmark( );
viewer.setXTabBookmark("crosstab2");
Returns the current instance ID of the data analyzer. This function is useful in integration with Interactive Viewer and supports the ability of Interactive Viewer to obtain and use the data analyzer instance ID.
return myviewer.getXTablid( );
Returns true when a pop-up containing a data analyzer is active and false in all other cases.
This example checks if a viewer exists by checking two conditions: the viewer variable exists, or isActive( ) returns true. When both conditions fail, the example code creates a new viewer object within a container:
if(!viewer || !viewer.isActive( )){
viewer = new actuate.XTabAnalyzer(container);
viewer.removeEventHandler(actuate.xtabanalyzer.EventConstants.ON_CONTENT_CHANGED, oldChangedHandler);
viewer.registerEventHandler(actuate.xtabanalyzer.EventConstants.ON_CONTENT_CHANGED, newChangedHandler);
viewer.removeEventHandler(actuate.xtabanalyzer.EventConstants.ON_CONTENT_CHANGED, oldChangedHandler);
viewer.registerEventHandler(actuate.xtabanalyzer.EventConstants.ON_CONTENT_CHANGED, newChangedHandler);
if ((width < 1000) && (height < 650)) {
viewer.resizeTo(width,height);
Rolls back all changes in the viewer since the last commit( ) call and refreshes the viewer’s content. The value of ivMode must be true for rollback( ) to function.
var height = viewer.getHeight
( );
viewer.setHeight(height);
Sets IVMode for the viewer. Integrating a Data Analytics viewer with the Interactive Viewer affects the undo/redo feature. When set to true, all changes to the Data Analytics viewer must be committed as one transaction. The Interactive Viewer can undo or redo the entire batch.
This example retrieves the left margin of the viewer and moves the margin 20 pixels to the right when the margin is less than 45 pixels from the edge of the screen:
var left = viewer.getLeft
( );
viewer.setLeft(left + 20);
This example checks to see if a pop-up window is active and sets a callback function to trigger when the pop-up closes:
viewer.setOnClosed(closerCallbackFunctionName);
var pos = viewer.getPosition
( );
viewer.setPosition('absolute');
container = document.getElementById("acviewer");
viewer = new actuate.XTabAnalyzer(container);
viewer.setReportName("reportfile.rptdocument");
}actuate.XTabAnalyzer.setService
viewer.setService(URL,options);
viewer.setSupportSVG(flag);
This example retrieves the current top margin for the viewer and moves the margin 20 pixels down the screen when the current position of the margin is fewer than 45 pixels from the top of the screen:
var top = viewer.getTop
( );
var options = viewer.getUIOptions
( );
options.enableToolbar(false);
viewer.setUIOptions(options);
var width = viewer.getWidth
( );
viewer.setWidth(width * 2);
This example retrieves the bookmark for the cross tab the viewer is associated with, changes the bookmark, and reloads the bookmark. This functionality enables the use of multiple cross tab elements within a single design.
var oldBookMark = viewer.getXTabBookmark
( );
viewer.setXTabBookmark("crosstab2");
Sets the instance ID for viewer rendering. This function is useful in integration with Interactive Viewer, and supports the ability of Interactive Viewer to obtain and use the cross tab instance ID.
Submits requests to the server for the Data Analyzer viewer. This method triggers an AJAX request to submit all pending operations for this object. The server returns a response after processing the pending operations. The results render on the page in the Data Analyzer container. The submit( ) function throws an exception when another submit( ) operation is pending. A CONTENT_CHANGED event fires when the Data Analyzer content changes.
This example retrieves the left margin of the viewer and expands the margin. The change does not take effect until submit( ) executes. The submit( ) function calls the function in the submitCallback parameter when submit( ) finishes executing. The callback function contains any processing that must occur after submit( ) finishes. Do not place code after the submit( ) call in the same function because submit( ) is asynchronous.
var left = viewer.getLeft
( );
viewer.setLeft(left + 20);
viewer.submit(submitCallback);