/* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| IBM Cognos Products: Viewer *| (C) Copyright IBM Corp. 2001, 2012 *| *| US Government Users Restricted Rights - Use, duplication or *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *| *+------------------------------------------------------------------------+ */ /** * This is the base class for generating request to re-run the report. * Classes derived from this will add to it their specific options. */ function RunReportAction() { this.m_reuseQuery = false; this.m_promptValues = null; this.m_sendParameterValues = false; this.m_clearCascadeParamsList = null; } RunReportAction.prototype = new CognosViewerAction(); RunReportAction.prototype.setRequestParams = function( params ) { if( !params ){ return; } this.m_promptValues = params.promptValues; this.m_clearCascadeParamsList = params.clearCascadeParamsList; }; RunReportAction.prototype.setSendParameterValues = function(sendParameterValues) { this.m_sendParameterValues = sendParameterValues; }; RunReportAction.prototype.reuseQuery =function() { return this.m_reuseQuery; }; RunReportAction.prototype.setReuseQuery = function( value ) { this.m_reuseQuery = value; }; RunReportAction.prototype.getPromptOption = function() { return "false";}; RunReportAction.prototype.canBeQueued = function() { return false; }; RunReportAction.prototype.getAction = function( limitedInteractiveMode ) { return limitedInteractiveMode ? 'run' : 'runSpecification'; } /** * Overrides base method in CognosViewerAction */ RunReportAction.prototype.addAdditionalOptions = function(cognosViewerRequest) { this._addCommonOptions(cognosViewerRequest); this._addRunOptionsFromProperties(cognosViewerRequest); this._addClearCascadeParams( cognosViewerRequest ); this._addPromptValuesToRequest( cognosViewerRequest ); }; RunReportAction.prototype._addClearCascadeParams = function( oReq ) { if( !this.m_clearCascadeParamsList || this.m_clearCascadeParamsList.length == 0){ return; } var iCount = this.m_clearCascadeParamsList.length; for( var i=0; i