getDocumentData() Method

In ScheduleService, use the getDocumentData() method to return a document generated by a scheduled job. The getDocumentData() method takes the jobOutputID as a parameter to return the appropriate document.

To get the jobOutputID: The scheduleReport() method returns jobID. Call getAllScheduledReportHistory() using this parent jobID to get a list of its children (schedule jobs). Use the appropriate child jobID to call getScheduledOutputInfo() to get a list of the outputIDs for this particular job. Use the outputID of the desired job as input (JobOutputID parameter) to the getDocumentData() method to retrieve the document data.

Note that the getDocumentData() method returns the byte[] of a report document, while the downloadDocumentData() Method saves the report document as a local file. The latter method returns the file ID, enabling the user to download the report document later through the Delivery Service. This is for performance concerns in cases where a report document size is large.

Signature

byte[] getDocumentData(String jobOutputID, String userID, String password);

Parameters for getDocumentData() Method

Parameter Description

String jobOutputID

Job output assigned to the output. The output ID is a string of integers.

String userID

Specifies the user name.

String password

Specifies the password for the user name.