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&Catalog=V3&
Path=ReportPathandName&Format=pdf&Action=Filter&P0=1&P1=op&P2=FilterColumn1Name&
P3=FilterColumn1Value&Refresh=Y" --max-redirect=100

Repeat the call to the method for each report you want to generate. Substitute your specific information for the parameters shown in the following table.

Table 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

  • Catalog (optional)

  • Path

  • Format

  • Action (optional)

  • Refresh

Method

ReportExecute

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

Catalog

V3

Optional, not case-sensitive. Specifies which catalog to use. The acceptable values are:

  • V3. If V3 is specified, then the ReportExecute method executes a report available in the Company Wide Shared Folder of the V3 catalog. This is the default value.

    To execute a report in the Company Wide Shared Folder of the V3 catalog, the following privilege is required: Access V3 Analytics.

  • V3m. If V3m is specified, then the ReportExecute method executes a report available in the Migrated Company Wide Shared Folder of the V3 catalog.

    To execute a report in the Migrated Company Wide Shared Folder of the V3 catalog, the following privilege is required: Access Migrated Company Wide Shared Folder.

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.

ReportPathandName must be URL Encoded.

Format

pdf

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

Action

&Action=Filter&P0=1 &P1=op&P2=Filter Column1Name&P3=Fil terColumn1Value

Optional. This parameter supports application of column filters during the report generation. The values shown in the sample are specific to the Filter action. For more information on using filters in reports, see Using Filters in the ReportExecute Method.

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 the 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 by Wget. The default value is 20, a value of 100 is sufficiently large enough for most reports.