Oracle CRM On Demand Report Services API Developer's Guide > Using the ReportExecute Method >

Calling the ReportExecute Method


When you have the Web session ID stored in a cookie file, you can then use the download tool to make the call to the ReportExecute method and get the report in the format you specify. When using Wget, the format for the call is as follows:

wget --content-on-error --load-cookie "cookiefile1.txt" --output-document "pathname.pdf" "https://secure-<servername>/OnDemand/user/ReportService?Method=ReportExecute&Path=<ReportPathandName>&Format=pdf&Refresh=Y"
--
max-redirect=100

Repeat the call to the method for each report you want to generate. You must substitute your specific information for the following parameters as shown in Table 3.

Table 3. Wget Command Parameters for Calling the ReportExecute Method
Parameter
Value in Example
Description

--load-cookie

"cookiefile1.txt"

The name of the file into which Wget stored the Web session ID. The quotation marks around the file name are mandatory in Wget.

--output-document

"pathname.pdf"

The path and file name of the report file to be stored. Make sure that the file extension used matches the format specified in the Format parameter. For example, if you are generating a PDF file, then make sure the file name ends with .pdf. The quotation marks around the path name are mandatory in Wget.

servername

<servername>

The name or address of the server hosting Oracle CRM On Demand.

Use one set of double quotes to enclose the portion of the URL containing the following parameters:

  • servername
  • Method
  • Path
  • Format
  • Refresh

Method

ReportExecute

This is the call to the ReportService API. The method name is ReportExecute.

Path

<ReportPathandName>

The folder path to the report in the company shared folder, including the report name. For example:

  • Region1Sales is a report in the shared folder named Region1Sales.
  • Sales/Opportunities is a report named Opportunities in the Sales folder within the company shared folder.

Report Path and Name must be URL Encoded.

Format

pdf

The report can be delivered in any of the following formats: PDF, XLS, TXT, CSV, and MHTML. This value is not case-sensitive.

Refresh

Y

Must be N (for No) or Y (for Yes).

If N, (recommended) then the ReportExecute method reuses the results of previously executed reports, which provides the fastest query performance for Analytical (Historical) reports.

If Y, then ReportExecute method refreshes the report values, which provides the most current data.

max-redirect

100

This is the number of attempts or redirects before the request is cancelled. The default value is 20, a value of 100 is sufficiently large enough for most reports.

Oracle CRM On Demand Report Services API Developer's Guide, Release 33 Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Legal Notices.