This function runs an existing report, using its report_id. This is obtained from the get_reports function.
Input
Class | Name | Type | Required | Details |
ExecuteReportRequest | userId | String | Yes | The caller’s user name |
ExecuteReportRequest | password | String | Yes | The caller’s password |
ExecuteReportRequest | status | String | No | The status of the items being collected |
ExecuteReportRequest | pageLength | Integer | Yes | The page length |
ExecuteReportRequest | persistHandle | String | No | A random string to persist the data |
ExecuteReportRequest | recordStart | Integer | No | The starting index of records returned |
ExecuteReportRequest | recordCount | Integer | No | The count of records being fetched |
ExecuteReportRequest | returnRawXML | boolean | No | Determines whether raw XML will be returned with the parse fields. This should be set to false for better performance |
Output
Class | Name | Type | Required | Details |
ExecuteReportResponse | success | boolean | Yes | True is succeeded False if failed |
ExecuteReportResponse | returnCode | String | No | See Appendix for details |
ExecuteReportResponse | returnMessage | String | No | Human readable message |
ExecuteReportResponse | xmlResults | String | No | The search results in XML format |
ExecuteReportResponse | itemRecords | Array[] | Yes | An array of ItemRecord objects |
ItemRecord | numberOfItemRecordFields | int | Yes | The number of field records in the child array |
ItemRecord | itemRecordFields | Array[] | Yes | An array of ItemRecordField objects |
ItemRecordField | fieldId | String | Yes | The id of the field |
ItemRecordField | fieldTitle | String | Yes | The title of the field |
ItemRecordField | fieldValue | String | Yes | The value of the field |
ItemRecordField | row | int | Yes | The repeating row value |
Example 1
public static void testExecuteReport(EVReportServiceStub stub) {
try {
ExecuteReportDocument reqEnvelope = ExecuteReportDocument.Factory.newInstance();
ExecuteReportRequest request = reqEnvelope.addNewExecuteReport().addNewRequest();
request.setUserId(ServiceClientHelper.ADMIN_USER_ID);
request.setPassword(ServiceClientHelper.ADMIN_PASSWORD);
request.setPageLength(100);
request.setRecordStart(1);
request.setRecordCount(120);
request.setPersistHandle(ServiceClientHelper.randStr);
request.setReportId(ServiceClientHelper.STANDARD_REPORT);
ExecuteReportResponseDocument resEnvelope = stub.executeReport(reqEnvelope);
ExecuteReportResponse response = resEnvelope.getExecuteReportResponse().getReturn();
if (response.getSuccess()) {
System.out.println("success: [" + response.getReturnCode() + "] : " +
response.getReturnMessage());
} else {
System.out.println("failure: [" + response.getReturnCode() + "] : " +
response.getReturnMessage());
}
} catch (Exception e) {
e.printStackTrace();
System.err.println("nnn");
}
}
Example 2
This is sample code for specifying runtime filters for a hierarchy report:
executeReport request = new executeReport();
/* fill with minimum data set */
request.setSearchMode("ADVANCED");
request.setApiReverseLookup("YES");
List<AdvancedFilterData> filters = new ArrayList<AdvancedFilterData>();
AdvancedFilterData filter = null;
// Priority = P 1 at base level
filter = new AdvancedFilterData();
filter.setFset("0");
filter.setFieldName("PRIORITY");
filter.setOperator("=");
filter.setValue1_EVDISPLAY("P 1");
filter.setMvalue1("");
filter.setValue2("");
filters.add(filter);
// DATE_CREATED between 09/01/2017 and 09/30/2017 at hierarchy level 1
filter = new AdvancedFilterData();
filter.setFset("1");
filter.setFieldName("DATE_CREATED");
filter.setOperator("between");
filter.setValue1_EVDISPLAY("09/01/2017");
filter.setMvalue1("09/01/2017");
filter.setValue2("09/30/2017");
filters.add(filter);
request.setAdvancedFilterData(filters.toArray(new AdvancedFilterData[filters.size()]));
Example 3
This is sample code for specifying runtime filters a non-hierarchy report
executeReport request = new executeReport();
/* fill with minimum data set */
request.setSearchMode("ADVANCED");
request.setApiReverseLookup("YES");
List<AdvancedFilterData> filters = new ArrayList<AdvancedFilterData>();
AdvancedFilterData filter = null;
// Priority = P 1
filter = new AdvancedFilterData();
filter.setFset("0"); // non-hierarhcy
filter.setFieldName("PRIORITY");
filter.setOperator("=");
filter.setValue1_EVDISPLAY("P 1");
filter.setMvalue1("");
filter.setValue2("");
filters.add(filter);
// DATE_CREATED between 09/01/2017 and 09/30/2017
filter = new AdvancedFilterData();
filter.setFset("0"); // non-hierarhcy
filter.setFieldName("DATE_CREATED");
filter.setOperator("between");
filter.setValue1_EVDISPLAY("09/01/2017");
filter.setMvalue1("09/01/2017");
filter.setValue2("09/30/2017");
filters.add(filter);
request.setAdvancedFilterData(filters.toArray(new AdvancedFilterData[filters.size()]));
Example 4
This is sample code for specifying runtime filters along with standard filters within a hierarchy report
executeReport request = new executeReport();
/* fill with minimum data set */
request.setApiReverseLookup("YES");
List<FilterData> filters = new ArrayList<FilterData>();
FilterData filter = null;
// Priority = P 1
filter = new FilterData();
filter.setName("PRIORITY");
filter.setValue("P 1");
filters.add(filter);
// Category= Software
filter = new FilterData();
filter.setName("CATEGORY");
filter.setValue("Software");
filters.add(filter);
request.setFilterData(filters.toArray(new FilterData[filters.size()]));