The actuate.Parameter class is a container for Actuate report parameters. Create an instance of the actuate.Parameter class using JavaScript, as shown in the following code:
The value of the "param1" parameter is the name value for the <div> element that holds the report parameters display. The page body must contain a <div> element with the param1 id, as shown in the following code:
Use setReportName( ) to set the report from which to retrieve parameters, as shown in the following code:
The setReportName( ) function takes the path and name of a report file in the repository as the only parameter. In this example, "/public/customerlist.rptdesign" indicates the Customer List report design in the /public directory.
The submit( ) function submits all of the asynchronous operations prepared by the calls to parameter functions. The submit function also triggers an AJAX request to download the report parameters to the client. The Actuate web application sends the requested report parameters and the page displays them as a form in the assigned <div> element. The submit( ) function takes a callback function as a parameter, shown above as processParameters.
actuate.initialize( "http://localhost:8900/iportal", null,null, null, displayParams);
The parameter component displays all of the parameters of the report in a form. When the parameters page is larger than the size of the viewer, the viewer provides scroll bars to navigate the parameters page.
To retrieve the parameters, use actuate.Parameter.downloadParameterValues( ). This function takes a callback function as an input parameter. The callback function processes the parameter values, as shown in the following code:
The downloadParameterValues( ) function requires the callback function to accept an array of parameter name and value pairs. The API formats this array properly for the actuate.Viewer class.