Using a data service component
The actuate.DataService class is a container for Actuate report data. Create an instance of the class with JavaScript, as shown in the following code:
To gather data from a report, define a request and send the request to the Actuate web application service for the data. The actuate.data.Request object defines a request. To construct the request object, use the actuate.data.Request constructor, as shown below:
n bookmark is a bookmark that identifies an Actuate report element. The actuate.data.Request object uses the bookmark to identify the report element from which to request information. If bookmark is null, the actuate.data.Request object uses the first bookmark in the report.To download the data, use dataservice.downloadResultSet( ), as shown in the following code:
dataservice.downloadResultSet(filedatasource, request, displayData, processError);
n filedatasource is the path and name of a report file in the repository. For example, "/public/customerlist.rptdesign" indicates the Customer List report design in the /public directory. The dataservice.downloadResultSet( ) function uses the Actuate web application service set with actuate.Initialize( ) by default.
n request is an actuate.data.Request object that contains the details that are sent to the Server in order to obtain specific report data.
n displayData is a callback function to perform an action with the downloaded data. This callback function takes an actuate.data.ResultSet object as an input parameter.
n processError is a callback function to use when an exception occurs. This callback function takes an actuate.Exception object as an input parameter.
(c) Copyright Actuate Corporation 2011 |
![]() |