前のトピック: GetReportData

次のトピック: Contract Methods

GetReportDataAndExport

Description

This method returns report data XML and exports the report.

Syntax

A typical syntax for this method is shown. Note that the exact syntax to use depends on the type of protocol used to communicate with the web service.

XmlNode

GetReportDataAndExport (
string

sessionID,
int

favoriteID, string parametersXML,
string

exportXML,
string

criteriaXML)

Parameter

Name

Type

Description

sessionID

string

Current session ID to perform authentication check.

favoriteID

int

ID of the report that needs to be retrieved.

parametersXML

int

Relevant only for free-form reports. Optional.

exportXML

string XML

Defines the export parameters.

criteriaXML

string XML

Defines the method's behavior. Optional.

Return Value

This XML also contains information about exported results (file paths) according to following format:

<RESULT …>
	:
	:
<EXPORT_RESULTS>
<FILE_PATH>sessiondata/673994876/FF_1_Param_6.pdf</FILE_PATH>
</EXPORT_RESULTS>
</RESULT>
parametersXML - should be defined in “brief” format of parameters FreeForm official XML. Values supplied by this XML are merged to FreeForm definition. Any irrelevant section or parameter might be omitted.
<connection>
	<params>
		<param name='@UID'><value>user id</value></param>
		<param name='@PWD' ><value>password</value></param>
	</params>
</connection>
<query>
	<params>
		<param name='@PRM1'><value>value 1</value></param>
		<param name='@PRM2'><value>value 2</value></param>
	</params>
</query>

exportXML

The parameter exportXML should be defined as follows. Note that upper case is mandatory.

<REPORT_EXPORT>
	<EXPORT_TYPE>{PDF(default)|CHART|HTML|MHT|CSV|CSVDO}</EXPORT_TYPE>
		<INCLUDED>
<REPORT>
{CHART(default)| DATA | FILTERS | RAW_DATA |BRC | CORRECTIONS | EXCEPTIONS | PENALTY_ADJ | PENALTY_ERR}
</REPORT>
<REPORT></REPORT>
		</INCLUDED>
</REPORT_EXPORT>

criteriaXML

The parameter criteriaXML should be defined as follows. Note that tag names are case sensitive.

<Criteria>
<UseCache>{1(default) | 0}</UseCache>
<GenerateIfNoCached>{1(default) | 0}</GenerateIfNoCached>
<Width>400</Width>
<Height>200</Height>
</Criteria>

Errors

If any errors occur, the web service will log and throw the InsightWebServiceException error.

Error Name

Description

AUTH_ERROR

Authentication failed.

NO_USER_PERMISSION

User does not have permission to view reports.

FOLDER_NOT_EXIST

Specified folder does not exist.

OE_ILLEGAL_PARAMETER

Specified parameter is not valid.

Remark

The parameters parametersXML and criteriaXML are optional. A free-form report that contains parameters but parametersXML is empty, results in a report error according to the default FreeForm parameters section.

All parameters are passed as type string, to ensure flexibility in calling the method.

Sample Scenarios

Possible scenarios to generate request report data:

Request

Result

Normal report

Report data is returned.

Normal report with chart

Report data is returned, report chart is generated and included in XML data.

Freeform report with chart

Report data is returned, report chart is generated and included in XML data.

Freeform report with parameters.

While report parameters have valid default values that report data is returned, otherwise error is returned.

Freeform report without chart

Report data is returned.

Compound report

Report data is returned.

Group report

Report data is returned.

Compound report with chart

Report data is returned, report chart is generated and included in XML data.

Group report with chart

Report data is returned, report chart is generated and included in XML data.