Like what you see? Have a play with our trial version.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleSUBSCRIBE

The SUBSCRIBE request will create/modify a subscription to a specified report for a specified user. This function request is usually called after SUBSCRIBEDETAILS to retrieve a current subscription first, otherwise a ScheduleRecord object must be created and populated appropriately (refer to ScheduleRecord) for this function call.

The following code will accomplish this:

Code Block
ReportServiceRequest rsr = new ReportServiceRequest();
ReportServiceResponse rs = null;
// Either retrieve a current ScheduleRecord beforehand or create a new one. A new one is created in this example
ScheduleRecord sr = new ScheduleRecord();

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("SUBSCRIBE");
rsr.setReportId(12345):
// This is the ID of the user to be subscribed
rsr.setReportUserId(19090);

// Refer to the ScheduleRecord schema definition for all possible variables
sr.setRecipient(19090);
sr.setFormat("PDF");
sr.setSubject("Athlete Analysis");
sr.getBodyTextsetBodyText("Pay attention to the data in October");
sr.setFrequencyTypeCode("FORTNIGHTLY");
sr.setFrequencyCode("ONE");
sr.setFrequencyUnit(1);
sr.setAdvancedTimezoneCode("AUSTRALIA/SYDNEY");
// total of seconds from 12am - the example below is set for 5.30pm
sr.setAdvancedTime(63000);

rs = ReportService.remoteAdministrationCall(rsr);

...

Expand
titleGETDASHBOARDREPORTFILTERVALUES

The GETDASHBOARDREPORTFILTERVALUES request will return filter metadata for a particular report on a dashboard tab.

The following code will accomplish this:

Code Block
ReportServiceRequest rsr = new ReportServiceRequest();
ReportServiceResponse rs = null;
ReportFilter[] rf = null;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("GETDASHBOARDREPORTFILTERVALUES");
// This is the ID of the dashboard tab
rsr.setDashboardTabId(11111);
rsrsr.getReportIdsetReportId(22222);

rs = ReportService.remoteAdministrationCall(rsr);
rf = rs.getReportFilters();

The returned ReportServiceResponse object consists of:

Response Element

Data Type

Description

Retrieval Code

ReportFilters

Array (ReportFilter)

Array of Filter objects containing metadata for each filter (see ReportFilter)

getReportFilters()

Expand
titleRUNDASHBOARDREPORT

The RUNDASHBOARDREPORT request will run and export a specified report on a dashboard tab. The response will include Base64 encoded generated html, including charts, GIS maps, and CSS styles.

The following code will accomplish this:

Code Block
ReportServiceRequest rsr = new ReportServiceRequest();
ReportServiceResponse rs = null;

rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organization
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("RUNDASHBOARDREPORT");
// This is the ID of the dashboard tab
rsr.setDashboardTabId(11111);
rsrsr.getReportIdsetReportId(22222);

rs = ReportService.remoteAdministrationCall(rsr);

The returned ReportServiceResponse object consists of:

Response Element

Data Type

Description

Retrieval Code

BinaryData

String

Base64 encoded binary chunk of HTML

getBinaryData()

Charts

Array (ReportChart)

Array of ReportChart objects (see ReportChart)

getCharts()

ReportStyle

String

CSS styles

GetReportStyle()

Breadcrumbs

Array (Breadcrumb)

Array of Breadcrumb objects

getBreadcrumbs()

GoogleMaps

Array (GMap)

Array of GoogleMaps objects if the report’s chart uses it

getGoogleMaps()

GisMap

Array (GISMap)

Array of GISMap objects if the report’s chart uses it

getGisMap()

...