Moving parameter values to the Viewer component
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( ):
When the viewer calls submit( ), the client transfers the parameters to the server with the other asynchronous operations for the Viewer.
The following code example shows a custom web page that displays parameters and then shows the report in a viewer using those parameters:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><script type="text/javascript" language="JavaScript" src="http://localhost:8700/iportal/jsapi"></script>The code in the this example uses the administrator user credentials and uses the default report installed with a standard installation of Information Console. The default report is at the following path:
/Public/BIRT and BIRT Studio Examples/Customer Order History.rptdesign
(c) Copyright Actuate Corporation 2011 |
![]() |