Web Services Developer's Guide → Web Services API Reference → SBM Application Web Services → Application Calls → RunReportXml
This service runs a specified report for a user, given the proper privileges.
Argument | Type | Description |
---|---|---|
auth (optional) | Auth | The Auth type supplies credentials and optionally, a host name for licensing. The userId and password can be specified with HTTP BASIC or WS-SECURITY instead. |
report (required) | ReportData | Specifies the report to run. |
options | Options | In the options argument, you can specify an XSL stylesheet
to transform the resultant XML. You can also specify that the results are
returned in a .zip file (in base64 encoded format).
You can also include extraOption elements to specify a query at runtime report. See the Usage notes below. |
RunReportXmlResult is returned. The report contents are returned in XML format by default. For more detail, see RunReportXmlResult.
The RunReportXml call executes a given report, assuming you have the proper privilege. Use the GetReports call to return a list of available reports without actually running any of the reports themselves. Once you identify the desired report, use RunReportXml or RunReport (which only executes Listing reports) to execute the report.
<urn:options> <urn:extraOption> <urn:name>XSLStyleSheet</urn:name> <urn:value>xsl/Excel.xsl</urn:value> </urn:extraOption> <urn:extraOption> <urn:name>zip</urn:name> </urn:extraOption> </urn:options>
An advanced usage of the RunReportXML call involves passing extraOptions that execute a Query At Runtime report. To execute a Query At Runtime report, you must have the report ID and the field ID(s) that are used on the Query At Runtime report form. You can find the field IDs by inspecting the Query At Runtime page in the Web browser. Enter the field ID in the <urn:name> element and the field value you are using for your query in the <urn:value> element. For a detailed example, see solution S141151.
The following XML example shows the <urn:extraOptions> and sample field IDs.
<urn:options> <urn:extraOption> <urn:name>F67v1</urn:name> <urn:value>Your Value</urn:value> </urn:extraOption> <urn:extraOption> <urn:name>F70v1</urn:name> <urn:value>Your Other Value</urn:value> </urn:extraOption> <urn:extraOption> <urn:name>HasRuntimeParams</urn:name> <urn:value>1</urn:value> </urn:extraOption> </urn:options>
The following XML is a snippet of the payload that is sent with RunReportXml.
<urn:RunReportXml> <urn:auth> <urn:userId>admin</urn:userId> <urn:password></urn:password> <urn:hostname></urn:hostname> <urn:loginAsUserId></urn:loginAsUserId> <urn:extendedData></urn:extendedData> </urn:auth> <urn:report> <urn:id>47</urn:id> <urn:reportReference></urn:reportReference> </urn:report> <urn:options> <urn:extraOption> <urn:name>XSLStyleSheet</urn:name> <urn:value>xsl/Excel.xsl</urn:value> </urn:extraOption> <urn:extraOption> <urn:name>zip</urn:name> </urn:extraOption> </urn:options> </urn:RunReportXml>
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.