Previous Topic: Report List ClassNext Topic: Index List Class


Report Data Class

The Report Data class, OmReportData, makes calls to the Report Data Web Service.

Programs that use the OmReportData class must include the following import statement in Java code:

import com.ca.omgmt.client.OmReportData;

Constants

The following list describes the constants of the OmReportData class:

TEXT

Report Type is text.

AFP

Report Type is AFP.

AFP2PDF

Report Type is AFP transformed to PDF.

BINARY

Report Type is Binary.

Methods

The following list describes the methods of the OmReportData class:

constructor

The default constructor for the class.

Parameter:None

constructor

The constructor for the class that sets the default timeout for requests.

Parameter:timeout: int

constructor

The constructor for the class that sets the default timeout for requests, path for the caching directory and cache threshold.

Parameter:timeout: int, cacheDirectory: String, cacheThreshold: int

invoke

Invokes the Report Data Web Service using the parameters that are passed as input.

Parameter:

userid: String

password: String

repository: String

returntype: String

pagefrom: String

pageto: String

textreportformat: String

reporttype: String

reporthandle: String

asAttachment: Boolean

port: String (default value: "8080")

servername: String (default value: "localhost")

protocol: String (default value: "http", other value: "https" for HTTPS protocol)

Last three parameters (port, servername, and protocol) are optional and can be omitted.

Code Samples

The following code sample retrieves pages one through 5 of a text report in a String in XML syntax (as Attachment is set to false):

OmReportData reportdata = new OmReportData(); String reporthandle = "c4e5d3d960c260c2c2c240404040404040404040fffaffee000000000000000000000000"; Object value; value=reportdata.invoke("omuserid","ompwd","omrepository","xmlstring","1","5","PA GE",
OmReportData.TEXT,reporthandle,false,"8080","omwsserver");

The following code sample retrieves an AFP report as an attachment (as Attachment set to true):

OmReportData reportdata = new OmRAFPeportData(); String reporthandle = "c8e3d3d960c260c2c2c240404040404040404040fffaffee000000000000000000000000 "; Object value; value=reportdata.invoke("omuserid","ompwd","omrepository","xmlstring","1","5","PA GE",
OmReportData.AFP,reporthandle,true,"8080","omwsserver");

The following code sample retrieves a transformed AFP report as a PDF file attachment (as Attachment set to true):

OmReportData reportdata = new OmRAFPeportData(); String reporthandle = "c8e3d3d960c260c2c2c240404040404040404040fffaffee000000000000000000000000 ";

DataHandler value:

value=(DataHandler)reportdata.invoke("omuserid","ompwd","omrepository","attachment","","","",
OmReportData.AFP2PDF,reporthandle,true,"8080","omwsserver");