RunReportXml

Description

This service runs a specified report for a user, given the proper privileges.

Arguments

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

Response

RunReportXmlResult is returned. The report contents are returned in XML format by default. For more detail, see RunReportXmlResult.

Usage

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.

The RunReportXML call enables you to specify a stylesheet in the options parameter to transform the XML result into a report that is similar to what is displayed in SBM User Workspace. You must specify a report stylesheet located on the Application Engine server here: installationDirectory\Serena\SBM\Application Engine\template. You can also specify an additional parameter to have Listing report results returned in a base64 encoded .zip file. For example, to transform the XML using the Excel.xsl stylesheet provided with SBM and zip the payload, send the following:
<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>
Note: In order to run a Built-in report, you must use RunReport. For details, see RunReport. This call is deprecated for all uses other than running Built-in reports.

Faults

XML

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>