downloadReportDataChunk() Method

In ReportService, use the downloadReportDataChunk() method to download very large documents, so that the caller calls this method multiple times until the entire data is downloaded.

Each call to this method downloads one chunk of the document, where the beginIdx parameter refers to the file download starting point. The client code can check if the value of ReportDataOffset is -1 and exit the loop. If it is -1, it means it finished reading all bytes from the file.

See ReportDataChunk.

Note:

When using uploadReportDataChunk() or downloadReportDataChunk() in a clustered environment, you must set the System Temporary Directory to be a shared directory accessible to all servers within the cluster. To set the System Temporary Directory:

  1. Sign in to Publisher with Administrator privileges.

  2. Click the Administration link.

  3. Under System Maintenance, click Server Configuration.

  4. Under General Properties in the System Temporary Directory property, enter the absolute path to a directory accessible to all servers in the cluster.

    For example, the directory can exist under ${xdo.server.config.dir}/temp but you must enter the absolute path, such as /net/subfoldera/scratch/subfolderb/bicat/temp

Repeat this procedure for all servers in the cluster, entering the same value for System Temporary Directory.

Signature

ReportDataChunk downloadReportDataChunk(String fileID, int beginIdx, int size);

Parameters for downloadReportDataChunk() Method

Parameter Description

String fileID

fileID is returned inside ReportResponse, which is returned when calling runReport() Method.

int beginIdx

The starting point of the index (default is 0).

int size

The size of the file to download (in bytes).