Retrieve Data for a Report

Dayforce SOAP Web Services Developer Guide

Version
R2024.2.0
Retrieve Data for a Report

When you have an XRefCode for a report, you can request the data from that report. There are two processes that can be used to retrieve the data. If the set of report data is smaller, such as fewer than 1,000 rows, then you can retrieve all of the data with a single request by submitting a GetReportRequest object. On the other hand, if the set of report data is larger, then you’ll want to make use of pagination to break the report up into more manageable data sets.

Request All Report Data for a Smaller Report

For reports with smaller data sets, such as fewer than 1,000 rows, you can retrieve all of the data with a single request. To do this:

  1. Instantiate a GetReportRequest object and set the XRefCode property with the xref code of the report.
  2. Pass this GetReportRequest object to the Execute method.

The response will contain a Report object which will contain the column and row data.

Sample Code - Request All Report Data for a Smaller Report Without Pagination

Figure 5: Retrieving the data for a Report for a small report.

Request Report Data of Larger Reports Using Pagination

Retrieving report data via pagination requires the following three step process:

  1. Open the report which will also set the page size, you’ll do this by submitting a OpenReportPagesRequest object. Opening the report will result in a unique ReportId for that instance of the report and you’ll also be given the total number of rows and pages within the report. 
  2. Retrieve each page of the report by submitting a GetReportPageRequest object and specify in the ReportId and a PageNumber.
  3. Close the report with CloseReportPagesRequest. This will clean up the data.

Sample Code - Retrieve Report Data Using Pagination

Figure 6: Retrieving report data via pagination.