The actuate.Viewer.setParameterValues( ) function adds the parameters set by the user to the viewer component. The setParameterValues( ) function takes as an input parameter an object composed of variables whose names correspond to parameter names. The downloadParameterValues( ) function returns a properly formatted object for use with actuate.Viewer.setParameterValues( ). The following code example shows how to call downloadParameterValues( ) and move the parameter name and value array into the Viewer with actuate.Viewer.setParameterValues( ):
var viewer = new actuate.Viewer("viewerpane");
viewer.setReportName("/Public/BIRT and BIRT Studio Examples/Customer Order History.rptdesign");
viewer.setParameterValues(ParameterValues);
When the viewer calls submit( ), the client transfers the parameters to the server with the other asynchronous operations for the Viewer.
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="content-type" content="text/
<title>Viewer With Parameters Page</title>
<script type="text/javascript" language="JavaScript"
src="http://localhost:8700/iportal/jsapi"></script>
<script type="text/javascript" language="JavaScript">
actuate.load("parameter");
actuate.initialize( "http://localhost:8700/iportal", null,null, null, displayParams);
function displayParams( ) {
param = new actuate.Parameter("parampane");
param.setReportName("/Public/BIRT and BIRT StudioExamples/Customer Order History.rptdesign");
function ( ) {this.run.style.visibility = 'visible';});
function processParameters( ) {
param.downloadParameterValues(runReport);
<input type="button" class="btn" name="run"
value="Run Report" onclick="processParameters( )"
style="visibility: hidden">
<script type="text/javascript" language="JavaScript" src="http://localhost:8700/iportal/jsapi"></script>
<script type="text/javascript" language="JavaScript">
function runReport(paramvalues) {
var viewer = new actuate.Viewer("viewerpane");
viewer.setReportName("/Public/BIRT and BIRT StudioExamples/Customer Order History.rptdesign");
viewer.setParameterValues(paramvalues);
The code in the example uses the administrator user credentials and the default report installed with a standard installation of Information Console. The default report is at the following path: