Constructs a new Interactive Crosstabs object in the specified container.
Parameters
xtabContainer
Object. A document object referencing the HTML <div> element that contains the XTabAnalyzer viewer.
xtabContainerId
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.
uiOptions
actuate.xtabanalyzer.UIOptions object. Optional. UIOptions references display options for the viewer.
Submits asynchronous operations and renders the requested components
commit
Syntax
void XTabAnalyzer.commit(function callback)
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( ).
Parameter
callback
Function. The callback function called after commit finishes.
Example
This example opens a design with a cross tab and pivots the cross tab:
actuate.xtabanalyzer.PageContent object. Content from the current page.
Example
This example retrieves the cross tab from the current page:
function getCrosstab(analyzerViewer){
var content = analyzerViewer.getCurrentPageContent( );
return content.getCrosstabByBookmark( );
}
getCurrentPageNum
Syntax
integer XTabAnalyzer.getCurrentPageNum( )
Returns the current page number.
Returns
Integer. The current page number.
Example
This example retrieves the page number:
function retrievePageNum( ){
return analyzerViewer.getCurrentPageNum( );
}
getGadgetId
Syntax
string XTabAnalyzer.getGadgetId( )
Returns the gadget ID of the shown cross tab. This function is used for dashboard integration.
Returns
String. A gadget ID.
Example
This example retrieves the gadget ID:
function retrieveGadgetID( ){
return analyzerViewer.getGadgetId( );
}
getHeight
Syntax
integer XTabAnalyzer.getHeight( )
Returns the height of the viewer.
Returns
Integer. The height in pixels.
Example
This example retrieves the current height of the viewer and doubles the height if the current height is lower than 630 pixels:
function doubleHeight( ){
var height = viewer.getHeight( );
if (height < 630){
viewer.setHeight(height * 2);
viewer.submit( );
}
}
getLeft
Syntax
integer XTabAnalyzer.getLeft( )
Returns the left margin of the viewer.
Returns
Integer. The left margin in pixels.
Example
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:
actuate.xtabanalyzer.ParameterValue[ ] or actuate.parameter.ParameterValue[ ]. An array of parameter values.
getPosition
Syntax
string XTabAnalyzer.getPosition( )
Returns the CSS position attribute for the viewer.
Returns
String. The CSS position attribute.
Example
This example changes the CSS positioning type from relative to absolute:
function changePosition( ){
if (viewer.getPosition( ) == 'relative'){
viewer.setPosition('absolute');
viewer.submit( );
}
}
getTop
Syntax
integer XTabAnalyzer.getTop( )
Returns the top margin of the viewer.
Returns
Integer. The top margin in pixels.
Example
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:
function moveTopMargin( ){
var top = viewer.getTop( );
if (top < 45) {
viewer.setTop(top + 20);
viewer.submit( );
}
}
getTotalPageCount
Syntax
integer XTabAnalyzer.getTotalPageCount( )
Returns the total page count.
Returns
Integer. The total number of pages.
Example
This example displays an alert with the total page count from viewer:
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.
Parameter
container
HTMLElement. The container instance ID from which to retrieve the viewer.
Returns
XTabAnalyzer object. The Interactive Crosstabs viewer.
Example
This example retrieves the viewer:
function retrieveViewer( ){
return viewer.getViewer( );
}
getWidth
Syntax
string XTabAnalyzer.getWidth( )
Returns the width value of the viewer.
Returns
String. The width in pixels.
Example
This example retrieves the width of the viewer, then alters it based on the size:
function doubleWidth( ){
var width = viewer.getWidth( );
if (width < 630){
viewer.setWidth(width * 2);
viewer.submit( );
}
}
getXTabBookmark
Syntax
string XTabAnalyzer.getXTabBookmark( )
Returns the bookmark name for the cross tab set to render in the viewer.
Returns
String. The bookmark for a cross tab.
Example
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.
function changeBookmark( ){
var oldBookMark = viewer.getXTabBookmark( );
viewer.setXTabBookmark("crosstab2");
viewer.submit( );
}
getXTabIid
Syntax
string XTabAnalyzer.getXTabIid( )
Returns the current instance ID of the interactive cross tab. This function is useful in integration with Interactive Viewer and supports the ability of Interactive Viewer to obtain and use the interactive cross tab instance ID.
Returns
String. An interactive cross tab instance ID.
Example
This example retrieves the interactive cross tab instance ID:
function retrieveXTablid( myviewer ){
return myviewer.getXTablid( );
}
isActive
Syntax
boolean XTabAnalyzer.isActive( )
Returns true when a pop‑up containing an interactive cross tab is active and false in all other cases.
Returns
Boolean. True indicates an active interactive cross tab pop-up window.
Example
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:
function checkViewer( ){
if(!viewer || !viewer.isActive( )){
viewer = new actuate.XTabAnalyzer(container);
}
}
isDashboard
Syntax
boolean XTabAnalyzer.isDashboard( )
Returns true when dashboard mode is active and false in all other cases.
Returns
Boolean. True indicates dashboard mode.
isInteractive
Syntax
boolean XTabAnalyzer.isInteractive( )
Returns whether this Interactive Crosstabs Viewer is in Interactive mode.
Returns
Boolean. True indicates dashboard mode.
Example
This example displays whether myDataAnalyzer is interactive:
Resizes the viewer to the specified height and width.
Parameters
width
Integer. The width in pixels.
height
Integer. The height in pixels.
Example
This example resizes the viewer when the new width is fewer than 1000 pixels and the new height is fewer than 650 pixels:
function resizeViewer(width,height){
if ((width < 1000) && (height < 650)){
viewer.resizeTo(width,height);
}
}
rollback
Syntax
void XTabAnalyzer.rollback(function callback)
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.
Parameter
callback
Function. The callback function called after rollback finishes.
Example
This example rolls back all changes to the viewer made since the last commit or submit function call:
function rollbackViewer( ){
viewer.rollback( );
}
setGadgetId
Syntax
void XTabAnalyzer.setGadgetId(string gadgetId)
Sets the cross tab gadget ID. This function is used for dashboard integration.
Parameter
gadgetId
String. The gadget ID used to render the cross tab.
Example
This example sets the gadget ID:
function setGadgetID(id){
viewer.setGadgetId(id);
}
setHeight
Syntax
void XTabAnalyzer.setHeight(integer height)
Changes the height of the viewer.
Parameter
height
Integer. The height in pixels.
Example
This example retrieves the viewer’s current height. When the current height is fewer than 630 pixels, the example code doubles the viewer’s height.
function doubleHeight( ){
var height = viewer.getHeight( );
if (height < 630) {
height = height * 2;
viewer.setHeight(height);
viewer.submit( );
}
}
setIVMode
Syntax
void XTabAnalyzer.setIVMode(boolean ivMode)
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.
Parameter
ivMode
Boolean. Set to true if using IV mode.
Example
This example sets IVMode for the viewer:
function setViewerMode(mode){
viewer.setIVMode(mode);
}
setLeft
Syntax
void XTabAnalyzer.setLeft(integer left)
Sets the position of the viewer’s left margin.
Parameter
left
Integer. The left margin for the viewer in pixels.
Example
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:
function moveLeftMargin( ){
var left = viewer.getLeft( );
if (left < 45){
viewer.setLeft(left + 20);
viewer.submit( );
}
}
setOnClosed
Syntax
void XTabAnalyzer.setOnClosed(function callback)
Sets a callback function to call when a viewer pop‑up closes.
Parameter
callback
Function. The function to call when the pop‑up closes.
Example
This example checks to see if a pop‑up window is active and sets a callback function to trigger when the pop‑up closes:
function setPopupCloser( ){
if(viewer.isActive( )){
viewer.setOnClosed(closerCallbackFunctionName);
}
}
setPageNum
Syntax
void XTabAnalyzer.setPageNum(function pageNum)
Sets the page number.
Parameter
pageNum
Integer. The page number.
Example
This example sets the sets the page number to the first page:
Sets the Actuate web application URL. This function can request options for that URL.
Parameters
iPortalURL
String. The URL of the Actuate web application.
requestOptions
actuate.RequestOptions object. Request options for the web application. This parameter is optional.
Example
This example sets the service and request options:
function setServerOptions(URL,options){
viewer.setService(URL,options);
}
setSupportSVG
Syntax
void XTabAnalyzer.setSupportSVG(boolean svgFlag)
Sets a flag indicating whether or not the browser supports SVG.
Parameter
svgFlag
Boolean. Flag indicating SVG support in the browser. This parameter’s value is true when the browser supports SVG and false in all other cases.
Example
This example sets the browser’s level of SVG support:
function setSVG(flag){
viewer.setSupportSVG(flag);
}
setTop
Syntax
void XTabAnalyzer.setTop(integer top)
Sets the top margin for the viewer.
Parameter
top
Integer. The top margin for the viewer in pixels.
Example
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:
Sets the bookmark for a cross tab to render in the viewer.
Parameter
bookmark
String. The bookmark for a cross tab.
Example
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.
function changeBookmark( ){
var oldBookMark = viewer.getXTabBookmark( );
viewer.setXTabBookmark("crosstab2");
viewer.submit( );
}
setXTabIid
Syntax
void XTabAnalyzer.setXTabIid(string iid)
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 Interactive Crosstabs 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 Interactive Crosstabs container. The submit( ) function throws an exception when another submit( ) operation is pending. A CONTENT_CHANGED event fires when the Interactive Crosstabs content changes.
Parameters
callback
Function. Optional. A function called when submit completes. This function receives the current XTabAnalyzer object as an input parameter.
rerun
Boolean. Optional. Indicates whether re-run the report design when it refreshes. Default to true.
Example
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.