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.

This section covers the overall administrative report web services.

 

 

...

Basic Functions

Anchor
 
test
test

Expand
titleTEST

This function is used to test whether or not the report web services service is working.

 

Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "TEST".

OrgRef

String

Client Org Internal Reference Id (optional).

 

 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
        <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <reportRequest>TEST</reportRequest>           
         </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response returned will contain these parameters:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <canDrill>false</canDrill>
            <dashboardEnabled>false</dashboardEnabled>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Connection Tested Successfully</messages>
            <messages>Unknown Or Unsupported Request: TEST</messages>
            <messages>Web Service Request Complete</messages>
            <private>false</private>
            <sessionId>f78fe29edb19bbfe45626c2203249f4b</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • 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
    languagejava
    ReportServiceRequest rsr = new ReportServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("TEST");


  • If you need to specify a particular client org:

    Code Block
    languagejava
    rsr.setOrgRef("org1");      // search for the report in this client org


  • Once the request is configured, carry out the call:

    Code Block
    languagejava
    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

    Initialize the Report web service. Click here to learn how to do this. 

 

  • The response returned will contain the StatusCode parameter. Refer to the Response Parameter table for details.

 


Complete Example

Below is a full example of this function. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_test_reportservices.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user to add details according to your environment.
  4. Run http://<host>:<port>/ws_test_reportservices.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%           
/*              ws_test_reportservices.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("TEST");
	rsr.setOrgRef("1");
	
	
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 
%>

 


 

Anchor
info
info

Expand
titleINFO

This web services retrieves details of a specified report.

 

Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "INFO".

OrgRef

String

Client Org internal reference ID (optional).

ReportIdIntegerYou can provide a report ID to search for a particular report.


 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
        <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <reportRequest>INFO</reportRequest>
            <reportId>60712</reportId>        
         </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response returned will contain these parameters:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE
ReportNameStringName of the specified report.
ReportDescriptionStringDescription of the specified report.
ReportUUIDIntegerUnique ID (or UUID) of the specified report.
HitCountIntegerNumber of times the report was accessed.
FormatCodeStringFormat code of the report.
AverageRunTimeIntegerAverage run time of the report.
CategoryStringCategory where report is present.
SubCategoryStringSub category of the report.
ReportUsageIntegerThe number of times the report has been used or accessed.
ViewNameStringName of the view.
DatasourceStringName of the data source.
AuthorStringUser who created the report.
AuthoringModeStringMode in which the report was created.
ReportTemplateStringTemplate of the report.
DataOutputStringData output. E.g. column.
DashboardEnabledBooleanTrue if the dashboard is enabled.
LastModifiedDateDateDate the report was last modified.

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <author>System Administrator</author>
            <authoringMode>JAVA</authoringMode>
            <averageRunTime>0</averageRunTime>
            <canDrill>false</canDrill>
            <category>Tutorial</category>
            <dashboardEnabled>true</dashboardEnabled>
            <dataOutput>COLUMN</dataOutput>
            <datasource>Ski Team</datasource>
            <errorCode>0</errorCode>
            <formatCode>REPORTANDCHART</formatCode>
            <hitCount>0</hitCount>
            <lastModifiedDate>2017-06-26</lastModifiedDate>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Loaded Report: 60712 Successfully</messages>
            <messages>Collating Report Information</messages>
            <messages>Web Service Request Complete</messages>
            <preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Company Name</span>
In List
<span class="rptFilterLogicIdentifier">[User Prompt]</span>
</div>]]></preRunFilterString>
            <private>false</private>
            <reportDescription>Top N Agencies compared to all other Agencies by demographic</reportDescription>
            <reportId>60712</reportId>
            <reportName>Agency Benchmark</reportName>
            <reportTemplate>REPORTANDCHART</reportTemplate>
            <reportUUID>c83357db-8aef-4ec7-ab72-fce34de9ee77</reportUUID>
            <reportUsage>0</reportUsage>
            <sessionId>900e9dfabd21bdef75410fa88fe501dd</sessionId>
            <statusCode>SUCCESS</statusCode>
            <subCategory>Marketing &amp; Booking</subCategory>
            <tags>No tags</tags>
            <viewName>New View</viewName>
         </return>
      </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • 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
    languagejava
    ReportServiceRequest rsr = new ReportServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("INFO");


  • If you need to specify the client org where the report exists, add this to your code:

    Code Block
    languagejava
    rsr.setOrgRef("org1");      // search for the report in this client org


  • You can even specify which report's comment to change the status of:

    Code Block
    languagejava
    rsr.setReportId(60712);



  • You may even specify the report client Reference ID or session ID:

    Code Block
    languagejava
    rsr.setReportClientReferenceId("1");
    rsr.setSessionId("18607a5670842650d512976b5d7ccddd");


  • Once the request is configured, carry out the call:

    Code Block
    languagejava
    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

    Initialize the Report web service. Click here to learn how to do this. 

 

  • The response returned will contain the StatusCode parameter, along with other report specific parameters. Refer to the Response Parameter table above for details.

 


Complete Example

Below is a full example of this function. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_info_report.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user to add details according to your environment.
  4. Run http://<host>:<port>/ws_info_report.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%           
/*              ws_info_report.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("INFO");

	rsr.setOrgRef("1");
	rsr.setReportId(60712);
	rsr.setReportClientReferenceId("1");
	rsr.setSessionId("18607a5670842650d512976b5d7ccddd");

	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 
%>

 


 

Anchor
schema
schema

Expand
titleSCHEMA

This web service returns schematic information of a specified report, which includes metadata for report columns and filters as well. A report needs to be specified by either providing its ID or by its web service name.

 

Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "SCHEMA".

OrgRef

String

Client Org internal reference ID (optional).

ReportIdIntegerYou can provide a The internal report ID to search for a particular report. The report ID changes every time a report is modified. Tip: you can use the GETIDFROMUUID function to get the relevant report ID.
ObjectNameString(Optional) The web service name of the report. This is not needed if the report ID is provided.


 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
         <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <reportRequest>SCHEMA</reportRequest>
            <reportId>60712</reportId>
            </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response returned will contain these main parameters:

ID of the specified reportReportName specified reportBinaryDataViewName view getHitCount()

Response Element

Data Type

Description

Retrieval Code

ReportId

Integer

getReportId()

StatusCode

String

Status of the web service request

getStatusCode()

FormatCode

String

Format code of the specified report

getFormatCode()

ReportType

String

Report type of the specified report

getReportType()

LastRunStatus

String

Status code of last report run

getLastRunStatus()

LastRunTime

Decimal

Last report run time in the format of YYYYMMDDHHMMSS

getLastRunTime()

. Possible values include:

  • SUCCESS
  • FAILURE

Columns

ReportSchema[]

Array of ReportSchema objects that contain information (metadata) on each column in the report result set, and whether the report requires user prompt filter data to be passed to it. See the below table for more details.

Author

String

Name of the user to wrote the report.

AuthoringMode

String


AverageRunTime

Integer


CanDrill

Boolean

Whether or not the report has any drill functionality enabled.

Category

String

Name of the folder the report is saved in.

SubCategory

String

Name of the

getReportName()

sub-folder the report is saved in.

DashboardEnabled

Boolean


DataOutput

String

Base64 encoded binary chunk of image, HTML, CSV, or PDF

getBinaryData()

One of:

  • COLUMN
  • ROW
  • PIVOT

Datasource

String

Name of

data source that the report depends on

getViewName()

HitCount

Integer

Number of times the specified report has been accessed

.

DrillCode

String

Drill type if available on the report

getDrillCode()

Private

 

Determines if the report is a private or a public one

getPrivate()

Results

ReportRow

Array of ReportRow objects that contain results in the report result set (see Main Report Services)

getResults()

ContentType

String

MIME ContentType of the returned object. Possible values include:

  • “text/html”
  • “text/comma-separated-values”
  • “image/png”
  • “application/pdf”

getContentType()

Messages

String[]

Array of Strings that show debug information as the report is run on the server. Used for debugging and tracing errors

getMessages()

Charts

ReportChart[]

Array of ReportChart objects that contains multiple chart bitmaps when attached to a HTML report response.

getCharts()

Columns

ReportSchema[]

Array of ReportSchema objects that contain information on each column in the report result set, and whether the report requires user prompt filter data to be passed to it.

getColumns()

 

 

Response Example

The service will return the below response, according to our SOAP example:

. One of:

  • DRILLDOWN
  • DRILLTHROUGH
  • DRILLANYWHERE

FormatCode

String

Format code of the specified report. One of:

  • REPORTANDCHART
  • CHART
  • REPORT

HitCount

Integer

Number of times the specified report has been accessed.

LastModifiedDate

String

Date when report was last modified.

LastRunDuration

Integer


PreRunFilterString

String


Private

Boolean

Determines if the report is a private or a public one. (Private for Legacy services.)

ReportDescription

String

Description of the specified report.

ReportId

Integer

ID of the specified report.

ReportName

String

Name of the specified report.

ReportTemplate

String

The template applied to the report. One of:

  • REPORTANDCHART
  • CHART
  • REPORT

ReportUUID

String

UUID of the report.

ReportUsage

Integer


ViewName

String

Name of view that the report depends on.

Tags

String


ErrorCode

Integer

The code number of the error if the web service fails.

Messages

String[]

Array of Strings that show debug information as the report is run on the server. Used for debugging and tracing errors.

Anchor
reportSchema
reportSchema

The ReportSchema object will return the following parameters containing information on the report column.

Parameter

Type

Description

ColumnName

String

Name of the report column.

DisplayName

String

Display name of column.

ColumnLength

String

Length of the report column.

FieldId

Integer

Field Id of column.

DataType

String

Data type of the report column.

SortOrder

Integer

The order in which the column is sorted.

Hidden

Boolean

Whether the column is displayed in the report or not.

NumberOfDecimals

Integer


OutputLocation

String


AllowPrompt

Boolean

Only for filters.

CachedValues

Boolean

Only for filters. Whether or not the filter is set to use Cached Values.

FilterDisplayType

String

Only for filters. Filter Display Type if the column is a filter.

FilterId

String

Only for filters. Filter Id if the column is a filter.

FilterOmittable

Boolean

Only for filters

FilterType

String

Only for filters. Determines the filter type and what data would have to be posted to engage the prompt.

DefaultValue1

String

Only for filters. First default value for filter if set.

DefaultValue2

String

Only for filters. Second default value for filter if set.

FilterTypeCode

String

Only for filters

FilterUUID

String

Only for filters. The UUID of the filter.

MinimumValue

BigDecimal

Only for filters. Minimum value for filter if set.

MaximumValue

BigDecimal

Only for filters. Maximum value for filter if set

ParentFilterId

Integer

Only for filters. Filter ID of parent filter if a filter dependency is in place.

Prompt

Boolean

Only for filters. Whether the column is a prompt field or not.

ValueUnitCode

String

Only for filters. Time units for the filter if set.


 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
  	<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
     	<return>
Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <author>System Administrator</author>
            <authoringMode>JAVA</authoringMode>
            <averageRunTime>1</averageRunTime>
            <canDrill>false</canDrill>
            <category>Tutorial</category>
            <columns>
               <columnName>TopN</columnName>
               <dataType>TEXT</dataType>
               <displayName>Top N</displayName>
               <fieldId>3</fieldId>
               <hidden>false</hidden>
             	<author>System  <numberOfDecimals>0<Administrator</numberOfDecimals>author>
               <outputLocation>COLUMN</outputLocation><authoringMode>JAVA</authoringMode>
               <prompt>false</prompt><averageRunTime>0</averageRunTime>
               <sortOrder>0</sortOrder><canDrill>false</canDrill>
 	           </columns><category>Tutorial</category>
            	<columns>
               <columnName>AGENCYNAME<<columnName>Region</columnName>
               <dataType>TEXT</dataType>
               <displayName>Company Name<	<displayName>Athlete Region</displayName>
               <fieldId>4<	<fieldId>1</fieldId>
               	<hidden>false</hidden>
               <numberOfDecimals>0</numberOfDecimals>
               <outputLocation>COLUMN</outputLocation>
               <prompt>false</prompt>
               <sortOrder>1<<sortOrder>0</sortOrder>
            	</columns>
            	<columns>
               <columnName>DEMOGRAPHIC<<allowPrompt>false</columnName>allowPrompt>
               <dataType>TEXT<<cachedValues>true</dataType>cachedValues>
               <displayName>Demographic<<columnName>Region</displayName>columnName>
               <fieldId>1<<dataType>TEXT</fieldId>dataType>
               <hidden>false</hidden>	<displayName>Athlete Region</displayName>
               <numberOfDecimals>0</numberOfDecimals>	<filterDisplayType>DROPDOWN</filterDisplayType>
               <outputLocation>COLUMN<<filterId>74908</outputLocation>filterId>
               <prompt>false<<filterOmittable>true</prompt>filterOmittable>
               <sortOrder>2<<filterType>INLIST</sortOrder>filterType>
               <<filterTypeCode>FILTER</columns>filterTypeCode>
      	      <columns><filterUUID>d4ea61ab-247e-403a-b51b-8243aeea63db</filterUUID>
               <columnName>FormulaBuilderMetric<<numberOfDecimals>0</columnName>numberOfDecimals>
               <dataType>NUMERIC<<prompt>true</dataType>prompt>
               <displayName>Sum Invoiced (Pref Currency)</displayName><sortOrder>0</sortOrder>
        	</columns>
       <fieldId>2< 	<dashboardEnabled>true</fieldId>dashboardEnabled>
               <hidden>false</hidden><dataOutput>COLUMN</dataOutput>
        	<datasource>Ski       <numberOfDecimals>0</numberOfDecimals>Team !!!</datasource>
               <outputLocation>COLUMN</outputLocation><drillCode>DRILLDOWN</drillCode>
               <prompt>false</prompt><errorCode>0</errorCode>
               <sortOrder>3</sortOrder><formatCode>REPORTANDCHART</formatCode>
            </columns>	<hitCount>3</hitCount>
            <columns><lastModifiedDate>2018-06-07</lastModifiedDate>
               <allowPrompt>true</allowPrompt><lastRunDuration>0</lastRunDuration>
        	<messages>Successfully Authenticated      <cachedValues>false</cachedValues>User: admin@yellowfin.com.au</messages>
        	<messages>Loaded Report: 74907     <columnName>AGENCYNAME</columnName>Successfully</messages>
        	<messages>Collating       <dataType>TEXT</dataType>Schema Information</messages>
        	<messages>Web Service      <displayName>Company Name</displayName>Request Complete</messages>
            <preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span  <filterDisplayType>TEXT</filterDisplayType>
    class="rptFilterLogicIdentifier">Athlete Region</span>
In List
<span class="rptFilterLogicIdentifier">[User Prompt]</span>
</div>]]></preRunFilterString>
           <filterId>60723< <private>false</filterId>private>
        	<reportDescription>Ski Team, 8/6/2018     <filterOmittable>true</filterOmittable>9:36 AM</reportDescription>
               <filterType>INLIST</filterType><reportId>74907</reportId>
               <filterTypeCode>FILTER</filterTypeCode>	<reportName>cached filters</reportName>
               <filterUUID>d3aaf0e4-4b67-4118-9871-7dc98933e4e3</filterUUID><reportTemplate>REPORTANDCHART</reportTemplate>
               <numberOfDecimals>0</numberOfDecimals><reportUUID>982500e8-7b33-476b-be47-6a1aab611349</reportUUID>
               <prompt>true</prompt>	<reportUsage>100</reportUsage>
               <sortOrder>1</sortOrder><sessionId>7e9971ea99fff609387ac1c504abcc63</sessionId>
            <<statusCode>SUCCESS</columns>statusCode>
            <dashboardEnabled>true<<subCategory>Training</dashboardEnabled>subCategory>
            <dataOutput>COLUMN</dataOutput>	<tags>No tags</tags>
        	<viewName>Ski    <datasource>Ski Team</datasource>viewName>
            <drillCode>NODRILL</drillCode></return>
            <errorCode>0</errorCode>	</ns2:remoteReportCallResponse>
            <formatCode>REPORTANDCHART</formatCode>
            <hitCount>2</hitCount>
            <lastModifiedDate>2017-06-26</lastModifiedDate>
            <lastRunDuration>0</lastRunDuration>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Loaded Report: 60712 Successfully</messages>
            <messages>Collating Schema Information</messages>
            <messages>Web Service Request Complete</messages>
            <preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Company Name</span>
In List
<span class="rptFilterLogicIdentifier">[User Prompt]</span>
</div>]]></preRunFilterString>
            <private>false</private>
            <reportDescription>Top N Agencies compared to all other Agencies by demographic</reportDescription>
</S:Body>
</S:Envelope>

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • 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
    languagejava
    ReportServiceRequest rsr = new ReportServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("SCHEMA");


  • If you need to specify the client org where the report exists, add this to your code:

    Code Block
    languagejava
    rsr.setOrgRef("org1");      // search for the report in this client org


  • You can even specify which report's comment to change the status of:

    Code Block
    languagejava
    rsr.setReportId(70045);



  • Once the request is configured, carry out the call:

    Code Block
    languagejava
    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

    Initialize the Report web service. Click here to learn how to do this. 

 

  • The response returned will contain the StatusCode parameter, along with other report specific parameters. Refer to the Response Parameter table above for details.

 


Complete Example

Below is a full example of this function. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_reportschema.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user details according to your environment.
  4. Run http://<host>:<port>/ws_reportschema.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%            <reportId>60712</reportId>
	
/*          	ws_reportschema.jsp  <reportName>Agency Benchmark</reportName>
            <reportTemplate>REPORTANDCHART</reportTemplate>
          	*/
%>
<%@  <reportUUID>c83357db-8aef-4ec7-ab72-fce34de9ee77</reportUUID>
            <reportUsage>9</reportUsage>
            <sessionId>da57441eaf7852ad59888e95775735fd</sessionId>
            <statusCode>SUCCESS</statusCode>
            <subCategory>Marketing &amp; Booking</subCategory>
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.*" %>
<% 
	ReportServiceResponse rs = null;
	ReportServiceRequest rsr = new ReportServiceRequest();
	ReportServiceService ts = new ReportServiceServiceLocator("localhost", 8080, "/services/ReportService", false);
	ReportServiceSoapBindingStub rssbs = (ReportServiceSoapBindingStub) ts.getReportService();
 
    rsr.setLoginId("admin@yellowfin.com.au");
	rsr.setPassword("test");
	rsr.setOrgId(1);
	rsr.setReportRequest("SCHEMA");
 	
	rsr.setReportId(70045);
 	
	rs = rssbs.remoteReportCall(rsr);
 
	if ("SUCCESS".equals(rs.getStatusCode())) {
    	out.write("Success </br>");
                  <tags>No tags</tags>
              	ReportSchema[] schema <viewName>Ski Team</viewName>
= rs.getColumns();
           </return>
        </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

ReportServiceRequest
 
rsr
 
=
 
new
 
ReportServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new
 
Integer(1)); rsr.setReportRequest("INFO");If you need to specify the client org where the report exists, add this to your code:
rsr.setOrgRef("org1");
     	for (ReportSchema s: schema)
                                                  	//
search for the report in this client orgYou can even specify which report's comment to change the status of:
Expand
titleStep-by-step instructions
Code Block
languagejava
themeEclipse
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
languagejava
Code Block
languagejava
Code Block
languagejava
rsr.setReportId(60712);
You may even specify the report client Reference ID or session ID:
Code Block
languagejava
rsr.setReportClientReferenceId("1");
rsr.setSessionId("18607a5670842650d512976b5d7ccddd");
Once the request is configured, carry out the call:
Code Block
languagejava
ReportServiceResponse rs=rsc.remoteReportCall(rsr);

Initialize the Report web service. Click here to learn how to do this. 

 

The response returned will contain the StatusCode parameter, along with other report specific parameters. Refer to the Response Parameter table above for details.

 

Complete Example

Below is a full example of this function. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_reportschema.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user details according to your environment.
  4. Run http://<host>:<port>/ws_reportschema.jsp from your Internet browser.

 

<%display filters:
                                                  	if (s.getFilterType() != null && s.getFilterTypeCode().equals("FILTER")){
                                                                    	out.write("<br>Display Name: " + s.getDisplayName());
                         
/*              ws_reportschema.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.setOrgRef("1");
	rsr.setReportRequest("SCHEMA");
	rsr.setReportId(60712);
	rsr.setReportClientReferenceId("1");
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	               	out.write("<br>Filter UUID:" + s.getFilterUUID());
                                                                    	out.write("<br>Filter Id:" + s.getFilterId());
                   Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs); 	}
	} else {
	      m.marshal(rootElement,out);out.write(rs.getStatusCode());
    
		//out.write("Success"rs.toString());
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	}  
%>


%>

 


 

...

Anchor
filteroptions
filteroptions

These web services are specific to the result generated by a report.

...

Expand
titleRESULTSETFILTEROPTIONS

This web service retrieves the result data of a specified report, as well as the report's metadata. The report's result will be in a raw, preformatted format. This result will be stored in an array of ReportRow objects, which each such object representing a result row. Therefore, for each of the rows, an array of strings containing the data in each column of the result data will be present.

Note: It is up to the web services client to convert this data from the string representation into the data type for each particular column. The data types for each column can be obtained with the SCHEMA function.

For example, here is a Role Population report that contains two columns and specifies the number of users assigned to each user role:

User RolePopulation
System Administrator1
Consumer & Collaborator5
Report Content Writer4

This web service will return a ReportRow object for each of the user role, which every object containing two data strings: one containing the name of the role, and the other displaying its user population.

 

 

returns the filter values for a specified report.

Note: There is currently no way to pass user information into this request. So if a report has access filters assigned to it that restrict certain values, then only the filter values that the logged in user (that is the user calling this web service) has access to, will be returned.

 

Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "RESULTSETFILTEROPTIONS".

OrgRef

String

(Optional) Client Org internal reference ID (optional).

ReportIdIntegerID of the report whose result data is to be viewed.
 

, if you want to specify a specific client org to search the report in. If not specified, the default org will be searched.

ReportClientReferenceId

String(Optional) This is another option to specify a particular client org.
ReportIdIntegerThe internal report ID to search for a particular report. The report ID changes every time a report is modified. Tip: you can use the GETIDFROMUUID function to get the relevant report ID.
ObjectNameStringThe internal filter ID. Tip: Use the SCHEMA function to get a valid filter ID as it changes each time the report is modified.


Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      	<web:remoteReportCall>
         	<arg0>
       	     	<loginId>admin@yellowfin.com.au</loginId>
        	    	<password>test</password>
        	    	<orgId>1</orgId>
        	    <reportRequest>RESULTSET<	<reportRequest>FILTEROPTIONS</reportRequest>
        	    <reportId>58511<	<reportId>70066</reportId>
        	  	<objectName>70081</objectName>
         </arg0>
      	</web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response returned will contain the following these main parameters: (For a more detailed list of response parameters, refer to the ReportServiceResponse object.)

Response Element

Data Type

Description

StatusCode

String

Status of the web service callrequest. Possible values include:

  • SUCCESS
  • FAILURE

Results

ReportRow[]

An array of object containing the result of the report's data set.

 

 

Response Example

The service will return the below response, according to our SOAP example:

Array of available filter values. See the table below for more details.

Author

String

Name of the user to wrote the report.

AuthoringMode

String


AverageRunTime

Integer


CanDrill

Boolean

Whether or not the report has any drill functionality enabled.

Category

String

Name of the folder the report is saved in.

SubCategory

String

Name of the sub-folder the report is saved in.

DashboardEnabled

Boolean


DataOutput

String

One of:

  • COLUMN
  • ROW
  • PIVOT

Datasource

String

Name of data source used for this report.

FormatCode

String

Format code of the specified report. One of:

  • REPORTANDCHART
  • CHART
  • REPORT

HitCount

Integer

Number of times the specified report has been accessed.

LastModifiedDate

String

Date when report was last modified.

LastRunDuration

Integer


PreRunFilterString

String


Private

Boolean

Determines if the report is a private or a public one. (Private for Legacy services.)

ReportDescription

String

Description of the specified report.

ReportId

Integer

ID of the specified report.

ReportName

String

Name of the specified report.

ReportTemplate

String

The template applied to the report. One of:

  • REPORTANDCHART
  • CHART
  • REPORT

ReportUUID

String

UUID of the report.

ReportUsage

Integer


ViewName

String

Name of view that the report depends on.

Tags

String


ErrorCode

Integer

The code number of the error if the web service fails.

Messages

String[]

Array of Strings that show debug information as the report is run on the server. Used for debugging and tracing errors.

Anchor
reportRow
reportRow

The ReportRow object will return the following parameter.

Parameter

Type

Description

DataValue

String[]

Array of Strings with data for each column in the report result set.


 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
  	<ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
     	<return>
Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <author>System Administrator</author>
            <authoringMode>JAVA</authoringMode>
            <averageRunTime>0</averageRunTime>
            <canDrill>false</canDrill>
            <category>Audit Reports</category>
            <dashboardEnabled>true</dashboardEnabled>
            <dataOutput>COLUMN</dataOutput>
            <datasource>Yellowfin Configuration Database</datasource>	<author>System Administrator</author>
            <errorCode>0<<authoringMode>JAVA</errorCode>authoringMode>
            <formatCode>REPORTANDCHART<<averageRunTime>0</formatCode>averageRunTime>
            <hitCount>4<<canDrill>false</hitCount>canDrill>
 	           <lastModifiedDate>2016-04-13</lastModifiedDate><category>Tutorial</category>
            <lastRunDuration>0<<dashboardEnabled>true</lastRunDuration>dashboardEnabled>
            <lastRunStatus>RUN_NOERROR<<dataOutput>COLUMN</lastRunStatus>dataOutput>
        	<datasource>Ski Team</datasource>
   <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
      <errorCode>0</errorCode>
      <messages>Loaded Report: 58511 Successfully</messages> 	<formatCode>REPORTANDCHART</formatCode>
            <messages>Returning RAW Resultset</messages>	<hitCount>2</hitCount>
            <messages>Request Contains No ReportFilter Records.</messages><lastModifiedDate>2018-06-18</lastModifiedDate>
            <messages>Report Run Successfully</messages><lastRunDuration>0</lastRunDuration>
        	<messages>Successfully Authenticated   <messages>Web Service Request Complete<User: admin@yellowfin.com.au</messages>
        	<messages>Loaded Report: 70080  <private>false<Successfully</private>messages>
            <reportDescription/>	<messages>Retrieving Options</messages>
        	<messages>Request Contains No ReportFilter <reportId>58511<Records.</reportId>messages>
        	<messages>Region (FilterId: 70082 ) <reportName>RoleRequires User Population<Prompt</reportName>messages>
        	<messages>Ignoring Prompt Filter On <reportTemplate>REPORTANDCHART</reportTemplate>
Field: 70082</messages>
        	<messages>DEMOGRAPHIC (FilterId: 70081 ) Requires  <reportUUID>00c65743-15f8-4f93-ace1-e3d4d2b956eb</reportUUID>User Prompt</messages>
        	<messages>Web Service Request  <reportUsage>7<Complete</reportUsage>messages>
        	<preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Athlete Region</span>
In <results>List
<span class="rptFilterLogicIdentifier">[User Prompt]</span>
</div>
<div class="rptFilterLogicText">
AND
<span class="rptFilterLogicIdentifier">Demographic</span>
In List
<span class="rptFilterLogicIdentifier">(Adventure, Relaxation, Family, Culture)</span>
</div>]]></preRunFilterString>
      <dataValue>System Administrator</dataValue>
      <private>false</private>
         <dataValue>1</dataValue>	<reportDescription>Ski Team, 18/6/2018 2:49 PM</reportDescription>
            <<reportId>70066</results>reportId>
            <results>
<reportName>qwerty</reportName>
            <reportTemplate>REPORTANDCHART</reportTemplate>
          <dataValue>Consumer &amp; Collaborator</dataValue> <reportUUID>c105ab26-9744-434d-9c8c-9fb9e48d80c0</reportUUID>
        	<reportUsage>100</reportUsage>
       <dataValue>5</dataValue> 	<results>
            </results>   <dataValue>Asia</dataValue>
            <sessionId>c958af74f677c4b1f575bd728d3b25d0</sessionId>
   <dataValue>Asia</dataValue>
         <statusCode>SUCCESS<	</statusCode>results>
            <subCategory>User Access<<sessionId>eb31d9392a25c8c40995237650837cd5</subCategory>sessionId>
        	<statusCode>SUCCESS</statusCode>
       <tags>No tags</tags>
    <subCategory>Training</subCategory>
        <viewName>NEW	<tags>No VIEW<tags</viewName>tags>
        	<viewName>New <View</return>viewName>
     	</return>
  	</ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • 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
    languagejava
    ReportServiceRequest rsr = new ReportServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("RESULTSETFILTEROPTIONS");


  • Specify the report to get its result setwhose filters are to be retrieved:

    Code Block
    languagejava
    rsr.setReportId(6071270066);


  • You may even specify the report client Reference IDTo retrieve a specific filter, provide its filter ID in the ObjectName parameter:

    Code Block
    languagejava
    rsr.setReportClientReferenceIdsetObjectName("170081");



  • Once the request is configured, carry out the call:

    Code Block
    languagejava
    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

    Initialize the Report web service. Click here to learn how to do this. 

 

  • The response returned will contain the StatusCode and Results parametersparameter, along with other report specific parameters. Refer to the Response Parameter table above for details.

 


Complete Example

Below is a full example of this function. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_resultsetfilteroptions.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user , and report details according to your environment.
  4. Run http://<host>:<port>/ws_resultsetfilteroptions.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%        	
/*       
/*   	ws_filteroptions.jsp           ws_resultset.jsp              	*/
%>
<% 
<%@	ReportServiceResponse pagers 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("RESULTSET");
	rsr.setReportId(60712);
	rsr.setReportClientReferenceId("1");
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		 
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	 null;
	ReportServiceRequest rsr = new ReportServiceRequest();
	ReportServiceService ts = new ReportServiceServiceLocator("localhost", 8080, "/services/ReportService", false);
	ReportServiceSoapBindingStub rssbs = (ReportServiceSoapBindingStub) ts.getReportService();
 
    rsr.setLoginId("admin@yellowfin.com.au");
	rsr.setPassword("test");
	rsr.setOrgId(1);
    rsr.setReportRequest("FILTEROPTIONS");
 	
	rsr.setReportId(70066);
    rsr.setObjectName("70081");
              	
 	
	rs = rssbs.remoteReportCall(rsr);
 
	if ("SUCCESS".equals(rs.getStatusCode())) {
    	out.write("Success </br>");
                   Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	  	ReportRow[] rows = rs.getResults();
             JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);    
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 

	
%>

 

 

Expand
titleFORMATTEDRESULTSET

This web service is similar to the RESULTSET one, however it returns the raw result set using the formatters from the report. 

 

Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "FORMATTEDRESULTSET".

OrgRef

String

Client Org internal reference ID (optional).

ReportIdIntegerID of the report whose result data is to be viewed.
 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
	for (ReportRow r: rows) {
                                                  	//display filter values:                                      	
                                                                    	out.write("<br>" + r.getDataValue()[0]);
                          <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
  	}
	} else {
    	out.write(rs.getStatusCode());
      <orgId>1</orgId>
            <reportRequest>FORMATTEDRESULTSET</reportRequest>
            <reportId>58511</reportId>
            </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>	out.write(rs.toString());
	}
%>
 

 


 


Report Result Set Functions

These web services are specific to the result generated by a report.

Anchor
resultset
resultset

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:
Expand
titleRESULTSET

This web service retrieves the result data of a specified report, as well as the report's metadata. The report's result will be in a raw, preformatted format. This result will be stored in an array of ReportRow objects, which each such object representing a result row. Therefore, for each of the rows, an array of strings containing the data in each column of the result data will be present.

Note: It is up to the web services client to convert this data from the string representation into the data type for each particular column. The data types for each column can be obtained with the SCHEMA function.

For example, here is a Role Population report that contains two columns and specifies the number of users assigned to each user role:

User RolePopulation
System Administrator1
Consumer & Collaborator5
Report Content Writer4

This web service will return a ReportRow object for each of the user role, which every object containing two data strings: one containing the name of the role, and the other displaying its user population.

 

 

Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "RESULTSET".

OrgRef

String

Client Org internal reference ID (optional).

ReportIdIntegerID of the report whose result data is to be viewed.


 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>

Response Elements

The response will contain the following main parameters: (For a more detailed list of response parameters, refer to the ReportServiceResponse object.)

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE
ResultsReportRow[]An array of object containing the result of the report's data set.

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <author>System Administrator</author>
            <authoringMode>JAVA</authoringMode><arg0>
            <averageRunTime>0</averageRunTime><loginId>admin@yellowfin.com.au</loginId>
            <canDrill>false<<password>test</canDrill>password>
            <category>Audit Reports<<orgId>1</category>orgId>
            <dashboardEnabled>true<<reportRequest>RESULTSET</dashboardEnabled>reportRequest>
            <dataOutput>COLUMN<<reportId>58511</dataOutput>reportId>
            <datasource>Yellowfin Configuration Database</datasource></arg0>
            <errorCode>0</errorCode></web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response will contain the following main parameters: (For a more detailed list of response parameters, refer to the ReportServiceResponse object.)

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE
ResultsReportRow[]An array of object containing the result of the report's data set.

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
         <formatCode>REPORTANDCHART</formatCode>
            <hitCount>5</hitCount>
            <lastModifiedDate>2016-04-13</lastModifiedDate>
            <lastRunDuration>0</lastRunDuration>
            <lastRunStatus>RUN_NOERROR</lastRunStatus>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Loaded Report: 58511 Successfully</messages>
  <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
          <messages>Returning RAW Resultset</messages><return>
            <messages>Request Contains No ReportFilter Records.</messages><author>System Administrator</author>
            <messages>Report Run Successfully</messages><authoringMode>JAVA</authoringMode>
            <messages>Web Service Request Complete</messages><averageRunTime>0</averageRunTime>
            <private>false<<canDrill>false</private>canDrill>
            <reportDescription<category>Audit Reports</>category>
            <reportId>58511<<dashboardEnabled>true</reportId>dashboardEnabled>
            <reportName>Role Population<<dataOutput>COLUMN</reportName>dataOutput>
            <datasource>Yellowfin Configuration <reportTemplate>REPORTANDCHART<Database</reportTemplate>datasource>
            <reportUUID>00c65743-15f8-4f93-ace1-e3d4d2b956eb</reportUUID><errorCode>0</errorCode>
            <reportUsage>9<<formatCode>REPORTANDCHART</reportUsage>formatCode>
            <results><hitCount>4</hitCount>
               <dataValue>System Administrator</dataValue><lastModifiedDate>2016-04-13</lastModifiedDate>
               <dataValue>1</dataValue><lastRunDuration>0</lastRunDuration>
            <<lastRunStatus>RUN_NOERROR</results>lastRunStatus>
            <results>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <dataValue>Consumer &amp; Collaborator</dataValue><messages>Loaded Report: 58511 Successfully</messages>
            <messages>Returning RAW  <dataValue>5<Resultset</dataValue>messages>
            <messages>Request Contains No ReportFilter Records.</results>messages>
            <sessionId>1e4f0c8ee07d24a5500f952a459b1652</sessionId><messages>Report Run Successfully</messages>
            <statusCode>SUCCESS</statusCode>
 <messages>Web Service Request Complete</messages>
            <private>false</private>
           <subCategory>User Access<<reportDescription/subCategory>>
            <tags>No tags<<reportId>58511</tags>reportId>
            <viewName>NEW<reportName>Role VIEW<Population</viewName>reportName>
         </return>
   <reportTemplate>REPORTANDCHART</reportTemplate>
           </ns2:remoteReportCallResponse> <reportUUID>00c65743-15f8-4f93-ace1-e3d4d2b956eb</reportUUID>
   </S:Body>
</S:Envelope>

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
Code Block
languagejava
ReportServiceRequest rsr = new ReportServiceRequest();

rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));

rsr.setReportRequest("FORMATTEDRESULTSET");
Specify the report to get its formatted result set:
Code Block
languagejava
rsr.setReportId(60712);
You may even specify the report client Reference ID:
Code Block
languagejava
rsr.setReportClientReferenceId("1");
Once the request is configured, carry out the call:
Code Block
languagejava
ReportServiceResponse rs=rsc.remoteReportCall(rsr);

Initialize the Report web service. Click here to learn how to do this. 

 

The response returned will contain the StatusCode and Results parameters, along with other report specific parameters. Refer to the Response Parameter table above for details.

 

Complete Example

Below is a full example of this function. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_resultset.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user, and report details according to your environment.
  4. Run http://<host>:<port>/ws_resultset.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%           
/*              ws_resultset.jsp               <reportUsage>7</reportUsage>
            <results>
               <dataValue>System Administrator</dataValue>
               <dataValue>1</dataValue>
            </results>
            <results>
               <dataValue>Consumer &amp; Collaborator</dataValue>
               <dataValue>5</dataValue>
            </results>
            <sessionId>c958af74f677c4b1f575bd728d3b25d0</sessionId>
            <statusCode>SUCCESS</statusCode>
            <subCategory>User Access</subCategory>
            <tags>No tags</tags>
            <viewName>NEW VIEW</viewName>
        * </return>
%>
<%@  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("FORMATTEDRESULTSET");
	rsr.setOrgRef("1");
	rsr.setReportId(60712);
	 </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • 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
    languagejava
    ReportServiceRequest rsr = new ReportServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("RESULTSET");


  • Specify the report to get its result set:

    Code Block
    languagejava
    rsr.setReportId(60712);



  • You may even specify the report client Reference ID:

    Code Block
    languagejava
    rsr.setReportClientReferenceId("1");

  • Once the request is configured, carry out the call:

    Code Block
    languagejava
    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

    Initialize the Report web service. Click here to learn how to do this. 

 

  • The response returned will contain the StatusCode and Results parameters, along with other report specific parameters. Refer to the Response Parameter table above for details.

 


Complete Example

Below is a full example of this function. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_resultset.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user, and report details according to your environment.
  4. Run http://<host>:<port>/ws_resultset.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%           
/*
	if ("SUCCESS".equals(rs.getStatusCode())) {
		
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	 ws_resultset.jsp          m.marshal(rootElement,out);    
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	}
	
%>

 

 

Report Comment Management

The web services in this section are related to user comments on Yellowfin reports.

 

Expand
titleGETCOMMENTS

This function retrieves all comments of a particular report, provided it has any.

 

Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "GETCOMMENTS".

OrgRef

String

Client Org Internal Reference Id (optional). Use this to search for the report in the referenced Client Org. If this is not set, then the report will be searched in the default (primary) org.

ReportIdIntegerYou can provide a report ID to retrieve its comments.

 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
         <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
*/
%>
<%@ 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("RESULTSET");
	rsr.setReportId(60712);
	rsr.setReportClientReferenceId("1");
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		 
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m   <password>test</password>
= context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,    <orgId>1</orgId>
   Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> <reportRequest>GETCOMMENTS</reportRequest>
rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"),        <reportId>70012</reportId>
ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);    </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 

	
%>

 


 

Anchor
formattedresultset
formattedresultset

Expand
titleFORMATTEDRESULTSET

This web service is similar to the RESULTSET function call, however it returns the raw result set using the formatters from the report. 

 

Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "FORMATTEDRESULTSET".

OrgRef

String

Client Org internal reference ID (optional).

ReportIdIntegerID of the report whose result data is to be viewed.


 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>

Response Elements

The response will contain the following main parameter:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE
CommentsReportComment[]Object containing the specified report's comments.

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
 <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <author>System Administrator</author>
            <authoringMode>JAVA</authoringMode>
            <averageRunTime>0</averageRunTime><arg0>
            <canDrill>false</canDrill><loginId>admin@yellowfin.com.au</loginId>
            <category>Tutorial<<password>test</category>password>
            <comments><orgId>1</orgId>
               <author>System Administrator</author><reportRequest>FORMATTEDRESULTSET</reportRequest>
               <authorId>5</authorId><reportId>58511</reportId>
               <comment>&lt;span>Great info.&lt;/span></comment></arg0>
               <commentDate>2018-03-18 17:32:54</commentDate></web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response will contain the following main parameters: (For a more detailed list of response parameters, refer to the ReportServiceResponse object.)

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE
ResultsReportRow[]An array of object containing the result of the report's data set.

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
            <commentId>2004</commentId>
               <lastActivityDate>2018-03-18 17:33:13</lastActivityDate>
         <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
     <parentCommentId>0</parentCommentId>
    <return>
            <author>System <reportId>70012<Administrator</reportId>author>
               <statusCode>OPEN</statusCode><authoringMode>JAVA</authoringMode>
            <<averageRunTime>0</comments>averageRunTime>
            <comments><canDrill>false</canDrill>
            <category>Audit   <author>System Administrator</author>Reports</category>
               <authorId>5</authorId><dashboardEnabled>true</dashboardEnabled>
               <comment>&lt;span>Want to see more structure.&lt;/span></comment><dataOutput>COLUMN</dataOutput>
            <datasource>Yellowfin   <commentDate>2018-03-18 17:33:13</commentDate>Configuration Database</datasource>
               <commentId>2005</commentId><errorCode>0</errorCode>
               <lastActivityDate>2018-03-18 17:33:13</lastActivityDate><formatCode>REPORTANDCHART</formatCode>
               <parentCommentId>2004</parentCommentId><hitCount>5</hitCount>
               <reportId>70012</reportId><lastModifiedDate>2016-04-13</lastModifiedDate>
               <statusCode>OPEN</statusCode><lastRunDuration>0</lastRunDuration>
            <<lastRunStatus>RUN_NOERROR</comments>lastRunStatus>
            <dashboardEnabled>true</dashboardEnabled>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
             <dataOutput>COLUMN</dataOutput>
<messages>Loaded Report: 58511 Successfully</messages>
            <messages>Returning <datasource>SkiRAW Team<Resultset</datasource>messages>
            <messages>Request Contains No ReportFilter <errorCode>0<Records.</errorCode>messages>
            <formatCode>CHART</formatCode>
<messages>Report Run Successfully</messages>
            <messages>Web <hitCount>3</hitCount>Service Request Complete</messages>
            <lastModifiedDate>2018-03-07</lastModifiedDate><private>false</private>
            <lastRunDuration>0<<reportDescription/lastRunDuration>>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages><reportId>58511</reportId>
            <messages>Loaded Report: 70012 Successfully</messages><reportName>Role Population</reportName>
            <messages>Web Service Request Complete</messages><reportTemplate>REPORTANDCHART</reportTemplate>
            <preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Invoiced Date</span>
Between
<span class="rptFilterLogicIdentifier">Current Date - 6 Years And Current Date</span>
</div>
.
.
.
	]]></preRunFilterString>
<reportUUID>00c65743-15f8-4f93-ace1-e3d4d2b956eb</reportUUID>
            <reportUsage>9</reportUsage>
            <private>false</private>
<results>
               <dataValue>System Administrator</dataValue>
       <reportDescription>This report provides a high level summary of campaigns<<dataValue>1</reportDescription>dataValue>
            <reportId>70012<</reportId>results>
            <reportName>Campaign Summary</reportName>
<results>
               <dataValue>Consumer &amp; <reportTemplate>CHART<Collaborator</reportTemplate>dataValue>
            <reportUUID>3e842fae-02f7-4ad3-a632-ca267e0078da</reportUUID>   <dataValue>5</dataValue>
            <reportUsage>100<</reportUsage>results>
            <sessionId>3ab136a400081d88c09526f8bdf9e2e7<<sessionId>1e4f0c8ee07d24a5500f952a459b1652</sessionId>
            <statusCode>SUCCESS</statusCode>
            <subCategory>Marketing &amp; Booking<<subCategory>User Access</subCategory>
            <tags>No tags</tags>
            <viewName>New<viewName>NEW View<VIEW</viewName>
         </return>
      </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>
 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • 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
    languagejava
    ReportServiceRequest rsr = new ReportServiceRequest();
    
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("GETCOMMENTSFORMATTEDRESULTSET");


  • Specify the report to get its formatted result set:

    Code Block
    languagejava
    rsr.setReportId(60712);



  • You may even specify the report client Reference IDIf you need to specify the client org where the report exists, add this to your code:

    Code Block
    languagejava
    rsr.setOrgRefsetReportClientReferenceId("org1");      // search for the report in this client org
    You can even specify which report's comments are to be retrieved:
    Code Block
    languagejava
    rc.setReportId(60712);
    1");


  • Specify which comment to change the status of, and the new status option:

     

    Pass the 'rc' object to the request:
    Code Block
    languagejava
    rsr.setReportComment(rc);

    Once the request is configured, carry out the call:

    Code Block
    languagejava
    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

    Initialize the Report web service. Click here to learn how to do this. 

 

  • The response returned will contain the StatusCode parameterand Results parameters, along with other report specific parameters. Refer to the Response Parameter table above for details.

 


Complete Example

Below is a full example of this function. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_getcommentsresultset.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user to add , and report details according to your environment.
  4. Run http://<host>:<port>/ws_getcommentsresultset.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%           
/*              ws_getcommentsresultset.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" %>
<%
/*
  Create Group
  Using Java generated stubs rather that using the Yellowfin webservices API..
*/

	
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("GETCOMMENTSFORMATTEDRESULTSET");
	rsr.setReportIdsetOrgRef(56401"1");
	rsr.setReportId(60712);
	rsr.setReportClientReferenceId("1");
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
	
%>

 

 

	
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);    
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	}
	
%>

 


 


Miscellaneous

Anchor
sendtoemail
sendtoemail

These are the mandatory parameters that you need to set in the ReportComment object for this function:

Expand
titleSENDTOEMAIL

This function sends a report to a recipient's email address.

 

Request Elements

The following elements will be passed with this request:

Request

Expand
titleCOMMENTSTATUS

This function is used to set the status of a report comment. The status options include: OPEN, EDITED, RESOLVED and DELETED.

 

Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "COMMENTSTATUS".

ReportComment

ReportComment

Object containing details of the report comment whose status is to be set. See table below.

OrgRef

String

Client Org Internal Reference Id (optional). Use this to search for the report in the referenced Client Org. If this is not set, then the report will be searched in the default (primary) org.

ReportIdIntegerYou can provide a report ID to search for a particular report.

 

Anchor
commentstatusrccommentstatusrc

ReportComment Element

Data Type

DescriptionRetrieval Code

LoginId

CommentId

Integer

ID of comment

getCommentId()

StatusCode

String

Provide the new status. The status option include: OPEN, EDITED, RESOLVED and DELETED.

getStatusCode()

 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
         <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <reportRequest>COMMENTSTATUS</reportRequest>
            <reportId>60712</reportId>
            <reportComment>
            	<commentId>12345</commentId>
            	<statusCode>OPEN</statusCode>
            </reportComment>
         </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response will contain the following main parameter:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <canDrill>false</canDrill>
            <dashboardEnabled>false</dashboardEnabled>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <private>false</private>
            <sessionId>6dc344c3e5dee88864998f4acc17d676</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
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
languagejava
ReportServiceRequest rsr = new ReportServiceRequest();

rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));

rsr.setReportRequest("COMMENTSTATUS");

 

If you need to specify the client org where the report exists, add this to your code:
Code Block
languagejava
rsr.setOrgRef("org1");      // search for the report in this client org
This function requires a ReportComment object to specify the new status to be given to the report:
Code Block
languagejava
ReportComment rc=new ReportComment();
You can even specify which report's comment to change the status of:
Code Block
languagejava
rc.setReportId(60712);
Specify which comment to change the status of, and the new status option:
Code Block
languagejava
rc.setCommentId(12345);
rc.setStatusCode("OPEN");
Pass the 'rc' object to the request:
Code Block
languagejava
rsr.setReportComment(rc);
Once the request is configured, carry out the call:
Code Block
languagejava
ReportServiceResponse rs=rsc.remoteReportCall(rsr);

Initialize the Report web service. Click here to learn how to do this. 

 

The response returned will contain the StatusCode parameter. Refer to the Response Parameter table above for details.

 

Complete Example

Below is a full example of this function. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_commentstatus.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user to add details according to your environment.
  4. Run http://<host>:<port>/ws_commentstatus.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
<%           
/*              ws_commentstatus.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" %>
<%
/*
  Create Group
  Using Java generated stubs rather that using the Yellowfin webservices API..
*/

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("COMMENTSTATUS");
	
	ReportComment rc=new ReportComment();
	rc.setReportId(60712);
	rc.setCommentId(12345);
	rc.setStatusCode("OPEN");
	rsr.setReportComment(rc);
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 
%>

 

 

 

Dashboard Management

The web services in this section are related to dashboard management.

 

This function retrieves a specified dashboard tab's definition or metadata.

 

Request Elements

The following elements will be passed with this request:

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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "SENDTOEMAIL".

OrgRef

String

Optional parameter to specify an internal reference ID of a Client Org.

ReportIdIntegerAn internal ID to of the report that is to be emailed.
ReportsOptionString[]A list of email addresses to send the report to.
AlterationCommand  
SessionIdInteger(Optional) To specify a previous session by its ID.
LanguageCode (Optional) To specify a language.


 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
         <arg0>
Expand
titleLOADDASHBOARDTAB

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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "LOADDASHBOARDTAB".

OrgRef

String

Optional parameter to specify an internal reference ID of a Client Org.

DashboardTabIdIntegerAn internal ID to specify the dashboard that is to be loaded.

 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
        <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <reportRequest>LOADDASHBOARDTAB</reportRequest>
            <dashboardTabId>61251</dashboardTabId>
         </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response returned will contain these parameters:

Response ElementData TypeDescription
StatusCodeStringStatus of the web service call. Possible values include:
  • SUCCESS
  • FAILURE
DashboardDashboardDefinitionObject containing metadata of the specified dashboard and its subtabs.

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <canDrill>false</canDrill>
            <dashboard>
               <elements>
                  <columnNumber>1</columnNumber>
                  <entityId>60947</entityId>
                  <entityTypeCode>REPORT</entityTypeCode>
                  <portletHeight>448</portletHeight>
                  <portletStatus>RESTORED</portletStatus>
                  <rowNumber>3</rowNumber>
                  <sequenceNumber>1</sequenceNumber>
                  <startDate>2017-06-26T00:00:00+10:00</startDate>
                  <tabId>61251</tabId>
               </elements>
               <elements>
                  <columnNumber>1</columnNumber>
                  <entityId>61001</entityId>
                  <entityTypeCode>REPORT</entityTypeCode>
                  <portletHeight>363</portletHeight>
                  <portletStatus>RESTORED</portletStatus>
                  <rowNumber>1</rowNumber>
                  <sequenceNumber>1</sequenceNumber>
                  <startDate>2017-06-26T00:00:00+10:00</startDate>
                  <tabId>61251</tabId>
               </elements>
                .
				.
				.
               <endDate>9999-12-31T00:00:00+11:00</endDate>
               <filters>
                  <componentId>0</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>SUMMARYCHART</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>0</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>SUMMARYCHART</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>0</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>SUMMARYCHART</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>61035</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>CHART</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>61067</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>SUMMARYCHART</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>61097</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>REPORT</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>0</componentId>
                  <entityId>61250</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>HELPON</formatKey>
                  <formatValue>true</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>0</componentId>
                  <entityId>61250</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>SUBTABS</formatKey>
                  <formatValue>OFF</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>0</componentId>
                  <entityId>61250</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>UNITSELECTION</formatKey>
                  <formatValue>OFF</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <groupTypeCode>SUBTAB</groupTypeCode>
               <languageCode>EN</languageCode>
               <longDescription/>
               <owner>0</owner>
               <parentGroupId>0</parentGroupId>
               <shortDescription>Sales Performance</shortDescription>
               <startDate>2017-06-26T00:00:00+10:00</startDate>
               <statusCode>OPEN</statusCode>
               <styleCode>TWO</styleCode>
               <tabId>61251</tabId>
            </dashboard>
            <dashboardEnabled>false</dashboardEnabled>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Attempting to Load Dashboard Tab: 61251</messages>
            <messages>Web Service Request Complete</messages>
            <private>false</private>
            <sessionId>03742b3ded4615ea3c6830654dc20aef</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
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
languagejava
ReportServiceRequest rsr = new ReportServiceRequest();
 
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));

rsr.setReportRequest("LOADPARENTDASHBOARDTAB");
If you need to specify the client org where the report exists, add this to your code:
Code Block
languagejava
rsr.setOrgRef("org1");      // search for the report in this client org
Specify which dashboard tab's details to fetch:
Code Block
languagejava
rsr.setDashboardTabId(70080);
Once the request is configured, carry out the call:
Code Block
languagejava
ReportServiceResponse rs=rsc.remoteReportCall(rsr);

Initialize the Report web service. Click here to learn how to do this. 

 

The response returned will contain the following parameters: StatusCode, Dashboard, Subtabs. (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:

  1. Copy the code and save it as ws_loadparentdashboardtab.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user to add details according to your environment.
  4. Run http://<host>:<port>/ws_loadparentdashboardtab.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
/*				ws_loadparentdashboardtab.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("LOADPARENTDASHBOARDTAB");
	rsr.setOrgRef("1");
	rsr.setReportId(60712);
	rsr.setAlterationCommand("drill-down|60712");
	rsr.setReportClientReferenceId("1");
	rsr.setDashboardTabId(70080);
	
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 
%>

  

 

Expand
titleLOADPARENTDASHBOARDTAB

This function retrieves a specific dashboard's parent tab's definition or metadata.

 

Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "LOADPARENTDASHBOARDTAB".

OrgRef

String

Optional parameter to specify an internal reference ID of a Client Org.

DashboardTabIdIntegerAn internal ID to specify the dashboard that is to be loaded.
SessionIdInteger(Optional) To specify a previous session by its ID.
LanguageCode (Optional) To specify a language.
ReportsOption (Optional) A list of email addresses to send the report to.

 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
        <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <reportRequest>LOADPARENTDASHBOARDTAB</reportRequest>
            <dashboardTabId>61251</dashboardTabId>
         </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response returned will contain these parameters:

Response ElementData TypeDescription
StatusCodeStringStatus of the web service call. Possible values include:
  • SUCCESS
  • FAILURE
DashboardDashboardDefinitionObject containing metadata of the specified dashboard and its subtabs.

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <canDrill>false</canDrill>
            <dashboard>
               <accessCode>UNSECURE</accessCode>
               <categoryCode>TUTORIAL</categoryCode>
               <elements>
                  <columnNumber>1</columnNumber>
                  <entityId>60947</entityId>
                  <entityTypeCode>REPORT</entityTypeCode>
                  <portletHeight>448</portletHeight>
                  <portletStatus>RESTORED</portletStatus>
                  <rowNumber>3</rowNumber>
                  <sequenceNumber>1</sequenceNumber>
                  <startDate>2017-06-26T00:00:00+10:00</startDate>
                  <tabId>61251</tabId>
               </elements>
               <elements>
                  <columnNumber>1</columnNumber>
                  <entityId>61001</entityId>
                  <entityTypeCode>REPORT</entityTypeCode>
                  <portletHeight>363</portletHeight>
                  <portletStatus>RESTORED</portletStatus>
                  <rowNumber>1</rowNumber>
                  <sequenceNumber>1</sequenceNumber>
                  <startDate>2017-06-26T00:00:00+10:00</startDate>
                  <tabId>61251</tabId>
               </elements>
               <elements>
                  <columnNumber>1</columnNumber>
                  <entityId>61097</entityId>
                  <entityTypeCode>REPORT</entityTypeCode>
                  <portletHeight>374</portletHeight>
                  <portletStatus>RESTORED</portletStatus>
                  <rowNumber>2</rowNumber>
                  <sequenceNumber>1</sequenceNumber>
                  <startDate>2017-06-26T00:00:00+10:00</startDate>
                  <tabId>61251</tabId>
               </elements>
               <elements>
                  <columnNumber>1</columnNumber>
                  <entityId>61046</entityId>
                  <entityTypeCode>REPORT</entityTypeCode>
                  <portletHeight>331</portletHeight>
                  <portletStatus>RESTORED</portletStatus>
                  <rowNumber>3</rowNumber>
                  <sequenceNumber>2</sequenceNumber>
                  <startDate>2017-06-26T00:00:00+10:00</startDate>
                  <tabId>61251</tabId>
               </elements>
               <elements>
                  <columnNumber>1</columnNumber>
                  <entityId>61067</entityId>
                  <entityTypeCode>REPORT</entityTypeCode>
                  <portletHeight>225</portletHeight>
                  <portletStatus>RESTORED</portletStatus>
                  <rowNumber>3</rowNumber>
                  <sequenceNumber>3</sequenceNumber>
                  <startDate>2017-06-26T00:00:00+10:00</startDate>
                  <tabId>61251</tabId>
               </elements>
               <elements>
                  <columnNumber>2</columnNumber>
                  <entityId>61035</entityId>
                  <entityTypeCode>REPORT</entityTypeCode>
                  <portletHeight>373</portletHeight>
                  <portletStatus>RESTORED</portletStatus>
                  <rowNumber>2</rowNumber>
                  <sequenceNumber>1</sequenceNumber>
                  <startDate>2017-06-26T00:00:00+10:00</startDate>
                  <tabId>61251</tabId>
               </elements>
               <endDate>9999-12-31T00:00:00+11:00</endDate>
               <filters>
                  <componentId>0</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>SUMMARYCHART</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>0</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>SUMMARYCHART</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>0</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>SUMMARYCHART</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>61035</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>CHART</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>61067</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>SUMMARYCHART</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>61097</componentId>
                  <componentTypeCode>REPORT</componentTypeCode>
                  <entityId>0</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>DEFAULTDISPLAY</formatKey>
                  <formatValue>REPORT</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>0</componentId>
                  <entityId>61250</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>HELPON</formatKey>
                  <formatValue>true</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>0</componentId>
                  <entityId>61250</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>SUBTABS</formatKey>
                  <formatValue>OFF</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <filters>
                  <componentId>0</componentId>
                  <entityId>61250</entityId>
                  <entityTypeCode>REPORTGROUP</entityTypeCode>
                  <formatKey>UNITSELECTION</formatKey>
                  <formatValue>OFF</formatValue>
                  <groupId>61250</groupId>
               </filters>
               <groupTypeCode>ANALYTIC</groupTypeCode>
               <languageCode>EN</languageCode>
               <longDescription/>
               <owner>1</owner>
               <ownerTypeCode>ORGANISATION</ownerTypeCode>
               <parentGroupId>0</parentGroupId>
               <shortDescription>Sales Performance</shortDescription>
               <startDate>2017-06-26T00:00:00+10:00</startDate>
               <statusCode>OPEN</statusCode>
               <subCategoryCode>ATHLETES</subCategoryCode>
               <subtabs>
                  <elements>
                     <columnNumber>1</columnNumber>
                     <entityId>60947</entityId>
                     <entityTypeCode>REPORT</entityTypeCode>
                     <portletHeight>448</portletHeight>
                     <portletStatus>RESTORED</portletStatus>
                     <rowNumber>3</rowNumber>
                     <sequenceNumber>1</sequenceNumber>
                     <startDate>2017-06-26T00:00:00+10:00</startDate>
                     <tabId>61251</tabId>
                  </elements>
                  <elements>
                     <columnNumber>1</columnNumber>
                     <entityId>61001</entityId>
                     <entityTypeCode>REPORT</entityTypeCode>
                     <portletHeight>363</portletHeight>
                     <portletStatus>RESTORED</portletStatus>
                     <rowNumber>1</rowNumber>
                     <sequenceNumber>1</sequenceNumber>
                     <startDate>2017-06-26T00:00:00+10:00</startDate>
                     <tabId>61251</tabId>
                  </elements>
                  <elements>
                     <columnNumber>1</columnNumber>
                     <entityId>61097</entityId>
                     <entityTypeCode>REPORT</entityTypeCode>
                     <portletHeight>374</portletHeight>
                     <portletStatus>RESTORED</portletStatus>
                     <rowNumber>2</rowNumber>
                     <sequenceNumber>1</sequenceNumber>
                     <startDate>2017-06-26T00:00:00+10:00</startDate>
                     <tabId>61251</tabId>
                  </elements>
                  <elements>
                     <columnNumber>1</columnNumber>
                     <entityId>61046</entityId>
                     <entityTypeCode>REPORT</entityTypeCode>
                     <portletHeight>331</portletHeight>
                     <portletStatus>RESTORED</portletStatus>
                     <rowNumber>3</rowNumber>
                     <sequenceNumber>2</sequenceNumber>
                     <startDate>2017-06-26T00:00:00+10:00</startDate>
                     <tabId>61251</tabId>
                  </elements>
                  <elements>
                     <columnNumber>1</columnNumber>
                     <entityId>61067</entityId>
                     <entityTypeCode>REPORT</entityTypeCode>
                     <portletHeight>225</portletHeight>
                     <portletStatus>RESTORED</portletStatus>
                     <rowNumber>3</rowNumber>
                     <sequenceNumber>3</sequenceNumber>
                     <startDate>2017-06-26T00:00:00+10:00</startDate>
                     <tabId>61251</tabId>
                  </elements>
                  <elements>
                     <columnNumber>2</columnNumber>
                     <entityId>61035</entityId>
                     <entityTypeCode>REPORT</entityTypeCode>
                     <portletHeight>373</portletHeight>
                     <portletStatus>RESTORED</portletStatus>
                     <rowNumber>2</rowNumber>
                     <sequenceNumber>1</sequenceNumber>
                     <startDate>2017-06-26T00:00:00+10:00</startDate>
                     <tabId>61251</tabId>
                  </elements>
                  <endDate>9999-12-31T00:00:00+11:00</endDate>
                  <filters>
                     <componentId>0</componentId>
                     <componentTypeCode>REPORT</componentTypeCode>
                     <entityId>0</entityId>
                     <entityTypeCode>REPORTGROUP</entityTypeCode>
                     <formatKey>DEFAULTDISPLAY</formatKey>
                     <formatValue>SUMMARYCHART</formatValue>
                     <groupId>61250</groupId>
                  </filters>
                  <filters>
                     <componentId>0</componentId>
                     <componentTypeCode>REPORT</componentTypeCode>
                     <entityId>0</entityId>
                     <entityTypeCode>REPORTGROUP</entityTypeCode>
                     <formatKey>DEFAULTDISPLAY</formatKey>
                     <formatValue>SUMMARYCHART</formatValue>
                     <groupId>61250</groupId>
                  </filters>
                  <filters>
                     <componentId>0</componentId>
                     <componentTypeCode>REPORT</componentTypeCode>
                     <entityId>0</entityId>
                     <entityTypeCode>REPORTGROUP</entityTypeCode>
                     <formatKey>DEFAULTDISPLAY</formatKey>
                     <formatValue>SUMMARYCHART</formatValue>
                     <groupId>61250</groupId>
                  </filters>
                  <filters>
                     <componentId>61035</componentId>
                     <componentTypeCode>REPORT</componentTypeCode>
                     <entityId>0</entityId>
                     <entityTypeCode>REPORTGROUP</entityTypeCode>
                     <formatKey>DEFAULTDISPLAY</formatKey>
                     <formatValue>CHART</formatValue>
                     <groupId>61250</groupId>
                  </filters>
                  <filters>
                     <componentId>61067</componentId>
                     <componentTypeCode>REPORT</componentTypeCode>
                     <entityId>0</entityId>
                     <entityTypeCode>REPORTGROUP</entityTypeCode>
                     <formatKey>DEFAULTDISPLAY</formatKey>
                     <formatValue>SUMMARYCHART</formatValue>
                     <groupId>61250</groupId>
                  </filters>
                  <filters>
                     <componentId>61097</componentId>
                     <componentTypeCode>REPORT</componentTypeCode>
                     <entityId>0</entityId>
                     <entityTypeCode>REPORTGROUP</entityTypeCode>
                     <formatKey>DEFAULTDISPLAY</formatKey>
                     <formatValue>REPORT</formatValue>
                     <groupId>61250</groupId>
                  </filters>
                  <filters>
                     <componentId>0</componentId>
                     <entityId>61250</entityId>
                     <entityTypeCode>REPORTGROUP</entityTypeCode>
                     <formatKey>HELPON</formatKey>
                     <formatValue>true</formatValue>
                     <groupId>61250</groupId>
                  </filters>
                  <filters>
                     <componentId>0</componentId>
                     <entityId>61250</entityId>
                     <entityTypeCode>REPORTGROUP</entityTypeCode>
                     <formatKey>SUBTABS</formatKey>
                     <formatValue>OFF</formatValue>
                     <groupId>61250</groupId>
                  </filters>
                  <filters>
                     <componentId>0</componentId>
                     <entityId>61250</entityId>
                     <entityTypeCode>REPORTGROUP</entityTypeCode>
                     <formatKey>UNITSELECTION</formatKey>
                     <formatValue>OFF</formatValue>
                     <groupId>61250</groupId>
                  </filters>
                  <groupTypeCode>SUBTAB</groupTypeCode>
                  <languageCode>EN</languageCode>
                  <owner>0</owner>
                  <parentGroupId>0</parentGroupId>
                  <shortDescription>New Tab</shortDescription><loginId>admin@yellowfin.com.au</loginId>
                  <startDate>2017-06-26T00:00:00+10:00</startDate><password>test</password>
                  <statusCode>OPEN</statusCode>
            <orgId>1</orgId>
      <styleCode>TWO</styleCode>
      <reportRequest>SENDTOEMAIL</reportRequest>
            <tabId>61251<<reportId>70012</tabId>reportId>
               </subtabs><alterationCommand>drill-down|70012</alterationCommand>
               <tabId>61250</tabId><reportOptions>
            </dashboard>	<string>binish.sheikh@yellowfin.com.au</string>
            <dashboardEnabled>false<</dashboardEnabled>reportOptions>
            <errorCode>0<</errorCode>arg0>
      </web:remoteReportCall>
      <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response will contain these main parameters:

Response ElementData TypeDescription
StatusCodeStringStatus of the web service call. Possible values include:
  • SUCCESS
  • FAILURE

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
         <messages>Attempting to Load Dashboard Tab: 61251</messages><ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
   <messages>Web Service Request Complete</messages>
            <private>false</private><author>System Administrator</author>
            <sessionId>af433c1d0f0cffa9d3a7e1ef8c72abf6<<authoringMode>JAVA</sessionId>authoringMode>
            <statusCode>SUCCESS<<averageRunTime>0</statusCode>averageRunTime>
         </return>
    <canDrill>false</canDrill>
  </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

rsr.setOrgRef("org1");
          <category>Tutorial</category>
            <dashboardEnabled>true</dashboardEnabled>
            <dataOutput>COLUMN</dataOutput>
            <datasource>Ski Team</datasource>
            <errorCode>0</errorCode>
            <formatCode>CHART</
/
formatCode>
   
search
 
for
 
the
 
report
 
in
 
this
 
client
 
orgSpecify which dashboard tab's details to fetch:
Expand
titleStep-by-step instructions
Code Block
languagejava
themeEclipse
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
languagejava
ReportServiceRequest rsr = new ReportServiceRequest();
 
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));

rsr.setReportRequest("LOADPARENTDASHBOARDTAB");
If you need to specify the client org where the report exists, add this to your code:
Code Block
languagejava
Code Block
languagejava
rsr.setDashboardTabId(70080);
Once the request is configured, carry out the call:
Code Block
languagejava
ReportServiceResponse rs=rsc.remoteReportCall(rsr);

Initialize the Report web service. Click here to learn how to do this. 

 

The response returned will contain the following parameters: StatusCode, Dashboard, Subtabs. (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:

  1. Copy the code and save it as ws_loadparentdashboardtab.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user to add details according to your environment.
  4. Run http://<host>:<port>/ws_loadparentdashboardtab.jsp from your Internet browser.

 

/*				ws_loadparentdashboardtab.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("LOADPARENTDASHBOARDTAB");
	rsr.setOrgRef("1");
	rsr.setReportId(60712);
	rsr.setAlterationCommand("drill-down|60712");
	rsr.setReportClientReferenceId("1");
	rsr.setDashboardTabId(70080);
	
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	  <hitCount>3</hitCount>
            <lastModifiedDate>2018-03-07</lastModifiedDate>
            <lastRunDuration>0</lastRunDuration>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Loaded Report: 70012 Successfully</messages>
            <messages>Web Service Request Complete</messages>
            <preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Invoiced Date</span>
Between
<span class="rptFilterLogicIdentifier">Current Date - 6 Years And Current Date</span>
</div>
.
.
.
]]></preRunFilterString>
            <private>false</private>
            <reportDescription>This report provides a high level summary of campaigns</reportDescription>
            <reportId>70012</reportId>
            <reportName>Campaign Summary</reportName>
            <reportTemplate>CHART</reportTemplate>
            <reportUUID>3e842fae-02f7-4ad3-a632-ca267e0078da</reportUUID>
            <reportUsage>100</reportUsage>
            <sessionId>fa0cc79a9ea229bd5df85b4a7f50c878</sessionId>
         Marshaller m = context.createMarshaller();
	 <statusCode>SUCCESS</statusCode>
            m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	  <subCategory>Marketing &amp; Booking</subCategory>
            <tags>No tags</tags>
      JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	 <viewName>New View</viewName>
         m.marshal(rootElement,out);
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 
%>

</return>
      </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>

 

 

 

 

Miscellaneous

 

This function sends a report to a recipient's email address.

 

Request Elements

The following elements will be passed with this request:

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
title
SENDTOEMAIL

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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "SENDTOEMAIL".

OrgRef

String

Optional parameter to specify an internal reference ID of a Client Org.

ReportIdIntegerAn internal ID to of the report that is to be emailed.
ReportsOptionString[]A list of email addresses to send the report to.
AlterationCommand  
SessionIdInteger(Optional) To specify a previous session by its ID.
LanguageCode (Optional) To specify a language.

 

Request Example

The following SOAP example shows the parameters that you can pass to this call:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:remoteReportCall>
         <arg0>
            <loginId>admin@yellowfin.com.au</loginId>
            <password>test</password>
            <orgId>1</orgId>
            <reportRequest>SENDTOEMAIL</reportRequest>
            <reportId>70012</reportId>
            <alterationCommand>drill-down|70012</alterationCommand>
            <reportOptions>
            	<string>binish.sheikh@yellowfin.com.au</string>
            </reportOptions>
            </arg0>
      </web:remoteReportCall>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Response Elements

The response will contain these main parameters:

Response ElementData TypeDescription
StatusCodeStringStatus of the web service call. Possible values include:
  • SUCCESS
  • FAILURE

 

 

Response Example

The service will return the below response, according to our SOAP example:

Code Block
languagexml
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <author>System Administrator</author>
            <authoringMode>JAVA</authoringMode>
            <averageRunTime>0</averageRunTime>
            <canDrill>false</canDrill>
            <category>Tutorial</category>
            <dashboardEnabled>true</dashboardEnabled>
            <dataOutput>COLUMN</dataOutput>
            <datasource>Ski Team</datasource>
            <errorCode>0</errorCode>
            <formatCode>CHART</formatCode>
            <hitCount>3</hitCount>
            <lastModifiedDate>2018-03-07</lastModifiedDate>
            <lastRunDuration>0</lastRunDuration>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Loaded Report: 70012 Successfully</messages>
            <messages>Web Service Request Complete</messages>
            <preRunFilterString><![CDATA[<div class="rptFilterLogicText">
<span class="rptFilterLogicIdentifier">Invoiced Date</span>
Between
<span class="rptFilterLogicIdentifier">Current Date - 6 Years And Current Date</span>
</div>
.
.
.
]]></preRunFilterString>
            <private>false</private>
            <reportDescription>This report provides a high level summary of campaigns</reportDescription>
            <reportId>70012</reportId>
            <reportName>Campaign Summary</reportName>
            <reportTemplate>CHART</reportTemplate>
            <reportUUID>3e842fae-02f7-4ad3-a632-ca267e0078da</reportUUID>
            <reportUsage>100</reportUsage>
            <sessionId>fa0cc79a9ea229bd5df85b4a7f50c878</sessionId>
            <statusCode>SUCCESS</statusCode>
            <subCategory>Marketing &amp; Booking</subCategory>
            <tags>No tags</tags>
            <viewName>New View</viewName>
         </return>
      </ns2:remoteReportCallResponse>
   </S:Body>
</S:Envelope>
 
Step-by-step instructions
  • 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
    languagejava
    ReportServiceRequest rsr = new ReportServiceRequest();
     
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("SENDTOEMAIL");


  • If you need to specify the client org where the report exists, add this to your code:

    Code Block
    languagejava
    rsr.setOrgRef("org1");      // search for the report in this client org



  • Specify the report that is to be emailed, and its alteration command:

    Code Block
    languagejava
    rsr.setReportId(60712);
    rsr.setAlterationCommand("drill-down|60712");



  • Then provide the email address(es) to send the report to:

    Code Block
    languagejava
    rsr.setReportOptions(new String[]{ "dummy@dummy.com"});



  • Once the request is configured, carry out the call:

    Code Block
    languagejava
    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

    Initialize the Report web service. Click here to learn how to do this. 

 

  • The response returned will contain the following parameters: StatusCode, Dashboard, Subtabs. (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:

  1. Copy the code and save it as ws_sendtoemail.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user details according to your environment.
  4. Run http://<host>:<port>/ws_sendtoemail.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse
/*				ws_sendtoemail.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("SENDTOEMAIL");
	rsr.setOrgRef("1");
	rsr.setReportId(60712);
	rsr.setAlterationCommand("drill-down|60712");
	rsr.setReportOptions(new String[]{ "dummy@dummy.com"});
	rsr.setReportClientReferenceId("1");
	rsr.setDashboardTabId(70080);
	
	ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	if ("SUCCESS".equals(rs.getStatusCode())) {
		
		 
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);    
	       
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 
%>

 


 

Anchor
command
command

Expand
titleCOMMAND

Processes an interaction from a report a web service report. This function is used to interact with a report, such as by changing a report page, performing drill-through, drill-down, drill-anywhere, or changing the series selection.

The AlterationCommand parameter is a text-code that is embedded in a report that can be passed back to the web service to alter the report.


Request Elements

The 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.

OrgId

Integer

Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1.

ReportRequest

String

Web services function. Set this to "COMMAND".

OrgRef

String

Client Org internal reference ID (optional).

ReportIdIntegerID of the report to be processed.
AlterationCommentStringCommand to be applied to the report. This specifies how the report should be altered. This parameter is a text-code that is embedded in a report; on retrieving the report details, you can pass this value to the web service to alter the report.
CommandHistoryString(Optional) List of piped commands, (Applies the command sequentially if the report has been wiped from the session.)
SessionIDString(Optional) ID of the previous session.
LanguageCodeString(Optional) To specify the language.

 

 

Response Elements

The response returned will contain these parameters:

Response Element

Data Type

Description

StatusCode

String

Status of the web service call. Possible values include:

  • SUCCESS
  • FAILURE

 

 

Instructions

See below for step-by-step instructions on how to perform this call, using a Java example:

Expand
titleStep-by-step instructions
  • 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
    languagejava
    ReportServiceRequest rsr = new ReportServiceRequest();
    

...

  • 
    rsr.setLoginId("admin@yellowfin.com.au");
    rsr.setPassword("test");
    rsr.setOrgId(new Integer(1));
    
    rsr.setReportRequest("

...

  • COMMAND");


  • If you need to specify the client org where the report exists, add this to your code:

    Code Block
    languagejava
    rsr.

...

  • setReportClientReferenceId("

...

  • 1");

...

  • 
    


  • Add the command to be applied to the report:

    Code Block
    languagejava
    rsr.

...

  • setAlterationCommand("

...

  • DRILLDOWN|60712|53655|RXVyb3Bl");

...



  • Pass the session ID from the previous request, if required:

    Code Block
    languagejava
    rsr.

...

  • setSessionId("ce509806176f6a0563767bfb0b2bb36f");


  • Once the request is configured, carry out the call:

    Code Block
    languagejava
    ReportServiceResponse rs=rsc.remoteReportCall(rsr);

    Initialize the Report web service. Click here to learn how to do this. 

 

  • The response returned will contain the

...

  • StatusCode

...

  • parameter, along with other report specific parameters. Refer to the Response Parameter table above for

...

  • details.

...



 


Complete Example

Below is a full example of this function. To use it for yourself, carry out the following the steps:

  1. Copy the code and save it as ws_

...

  1. command_report.jsp.
  2. Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
  3. Adjust host, port, and admin user to add details according to your environment.
  4. Run http://<host>:<port>/ws_

...

  1. command_report.jsp from your Internet browser.

 

Code Block
languagejava
themeEclipse

...

<%@page import="com.thoughtworks.xstream.io.xml.StaxDriver"%>
<%@ 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("

...

COMMAND");
	rsr.

...

setReportId(60712);


	rsr.setAlterationCommand("

...

DRILLDOWN|60712|53655|RXVyb3Bl");

...


	rsr.setReportClientReferenceId("1");
	rsr.

...

setSessionId(

...

"ce509806176f6a0563767bfb0b2bb36f");
	

...

ReportServiceResponse rs=rsc.remoteReportCall(rsr);
	
	if ("SUCCESS".equals(rs.getStatusCode())) {
		
		%> <xmp> <% 
		  JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class);
	        Marshaller m = context.createMarshaller();
	        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML
	        JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs);
	        m.marshal(rootElement,out);    
	        %></xmp><%
		//out.write("Success");
	} else {
		out.write("Failure");
		out.write(" Code: " + rs.getErrorCode());
	} 
%>