Page History
These report web services allows user to generate allow users to return a report in a specified format, such as HTML, PDF, XLS, DOC, etc. The PRINT function returns a report in a different printable format.
Anchor | ||||
---|---|---|---|---|
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The HTML request will return an HTML representation of the report. The HTML document will be stored in the BinaryData parameter, as Base64 encoded data. The report's charts and/or images will be stored in an array of Chart parameters. These artefacts will need to be manually decoded by the client system, and the URL request string is used to embed the URL within the HTML for decoding the Base64 images. There are three HTML related web services that display slightly varying HTML documents:
Request ElementsThe following elements will be passed with this request: This function returns a specified report in the XLS or XLSX format (Excel spreadsheet).
Request ElementsThe following elements will be passed with this request: Request Element Data Type Description LoginId String Yellowfin web services administrator user Id. This can be the user ID or the email address, depending on the Logon ID method. This Yellowfin account must have the “web services” role enabled, and must belong to the Default (i.e. Primary) Org. Password String Password of the above account.
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ElementsThe response will contain these main parameters:
Status of the web service call. Possible values include: |
ReportId Integer ID of the specified report. ReportName String Name of the specified report. HitCount Integer Number of times the specified report has been accessed. FormatCode String Format code of the specified report. BinaryData String Report data as Base64 encoded binary chunk of XLSX or XLS. ContentType String MIME Content Type of this object. Value will be “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”
Response ExampleThe service will return the below response, according to our SOAP example:
Response ExampleThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Initialize the Report web service. Click here to learn how to do this. The response returned will contain the parameters including, StatusCode, ReportID, BinaryData, etc. (See the Response Parameters table above for more details.) Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
...
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
This function returns a specified report in the XLS or XLSX format (Excel spreadsheet).
Request ElementsThe following elements will be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
|
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
This function returns a specified report in the DOC or DOCX form (Microsoft Word).
Request ElementsThe following elements will be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ElementsThe response returned will contain these parameters:
Response ExampleThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example: Expand | | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
ReportId | Integer | ID of the specified report. |
ReportName | String | Name of the specified report. |
HitCount | Integer | Number of times the specified report has been accessed. |
FormatCode | String | Format code of the specified report. |
BinaryData | String | Report data as Base64 encoded binary chunk of XLSX or XLS. |
ContentType | String | MIME Content Type of this object. Value will be “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” |
Response Example
The service will return the below response, according to our SOAP example
Here's a basic request to perform this call, which includes logging in as the admin user and specifying the web service call to perform:Code Block | ||
---|---|---|
| ||
ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("DOCX"); |
:
Code Block | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
Code Block | |||||||||||
| |||||||||||
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
| java | rsr.setOrgRef("org1");
Code Block | ||
---|---|---|
| ||
rsr.setReportId(60712); |
Code Block | ||
---|---|---|
| ||
ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
Initialize the Report web service. Click here to learn how to do this.
The response returned will contain the parameters including, StatusCode, ReportID, BinaryData, etc. (See the Response Parameters table above for more details.)
Complete Example
Below is a full example of this function. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_docxreport.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user to add details according to your environment.
- Run http://<host>:<port>/ws_docxreport.jsp from your Internet browser.
/* ws_docxreport.jsp */ <%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page import="com.hof.util.*, java.util.*, java.text.*" %> <%@ page import="com.hof.web.form.*" %> <%@ page import="com.hof.mi.web.service.*" %> <%@ page import="javax.xml.bind.JAXBContext" %> <%@ page import="javax.xml.bind.Marshaller" %> <%@ page import="java.io.StringWriter" %> <%@ page import="javax.xml.bind.JAXBElement" %> <%@ page import="javax.xml.namespace.QName" %> <% ReportService rsc = new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService"); ReportServiceRequest rsr = new ReportServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setReportRequest("DOCX"); rsr.setOrgRef("1"); rsr.setReportId(60712); rsr.setReportClientReferenceId("1"); ReportServiceResponse rs=rsc.remoteReportCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) { JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class); webservices.web.mi.hof.com/"> <return> <author>System Administrator</author> <authoringMode>JAVA</authoringMode> <averageRunTime>0</averageRunTime> <binaryData>UEsDBBQACAgIAJUKa0wAAAAAAAAAAAAAAAALAAAAX3JlbHMvLnJlb ...</binaryData> <canDrill>false</canDrill> <category>Audit Reports</category> <contentType>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</contentType> <dashboardEnabled>true</dashboardEnabled> <dataOutput>COLUMN</dataOutput> <datasource>Yellowfin Configuration Database</datasource> <errorCode>0</errorCode> <formatCode>REPORTANDCHART</formatCode> <hitCount>25</hitCount> <lastModifiedDate>2016-03-29</lastModifiedDate> <lastRunDuration>0</lastRunDuration> <lastRunStatus>RUN_NOERROR</lastRunStatus> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Loaded Report: 56401 Successfully</messages> Marshaller m<messages>Generating = context.createMarshaller(); XLS Report</messages> <messages>Request Contains m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML No ReportFilter Records.</messages> JAXBElement<ReportServiceResponse> rootElement<messages>Report = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs); Run Successfully</messages> m.marshal(rootElement,out); //out.write("Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %> |
...
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
This function returns a specified report in the DOC or DOCX form (Microsoft Word).
Request ElementsThe following elements will be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
|
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The HTML request will return an HTML representation of the report. The HTML document will be stored in the BinaryData parameter, as Base64 encoded data. The report's charts and/or images will be stored in an array of Chart parameters. These artefacts will need to be manually decoded by the client system, and the URL request string is used to embed the URL within the HTML for decoding the Base64 images.
Request ElementsThe following elements will be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ElementsThe response will contain these main parameters:
Response ExampleThe service will return the below response, according to our SOAP example:
Response ElementsThe response returned will contain these parameters:
Response ExampleThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The PDF request runs a specified report and returns it in PDF form.
Request ElementsThe following elements will be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ElementsThe response will contain these main parameters:
Response ExampleThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This request runs a specified report and returns it in CSV (comma separated values) form.
Request ElementsThe following elements will be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ElementsThe response will contain these main parameters:
Response ExampleThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This request runs a specified report and returns it in its Text form.
Request ElementsThe following elements will be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ElementsThe response will contain these main parameters:
Response ExampleThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The web service returns a report in a printable format rather than the default.
Request ElementsThe following elements will be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ElementsThe response will contain these main parameters:
Response ExampleThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Initialize the Report web service. Click here to learn how to do this. The response returned will contain the parameters related to the report. (See the Response Parameters table above for more details.) Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
...
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
|
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
The PDF request runs a specified report and returns it in PDF form. The following code will accomplish this:
The returned ReportServiceResponse object consists of:
|
...
Expand | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
The CSV request runs a specified report and returns it in CSV form. The following code will accomplish this:
The returned ReportServiceResponse object consists of:
|
...
Expand | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
The TEXT request runs a specified report and returns it in TEXT form. The following code will accomplish this:
The returned ReportServiceResponse object consists of:
|
...
Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
...
Expand | |||
---|---|---|---|
| |||
The RTF request runs a specified report and returns it in RTF form. The following code will accomplish this:
The returned ReportServiceResponse object consists of: | |||
Response Element | Data Type | Description | Retrieval Code |
ReportId | Integer | ID of the specified report |
|
ReportName | String | Name of the specified report |
|
HitCount | Integer | Number of times the specified report has been accessed |
|
FormatCode | String | Format code of the specified report |
|
BinaryData | String | Base64 encoded binary chunk of XLS |
| ContentType | String | MIME Content Type of this object. Value will be “application/rtf” |