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.
Parameter | Value in Example | Description |
---|---|---|
--load-cookie |
|
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 |
|
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 |
|
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:
|
Method |
|
This is the call to the ReportService API. The method name is ReportExecute. |
Catalog |
|
Optional, not case-sensitive. Specifies which catalog to use. The acceptable values are:
|
Path |
|
The folder path to the report in the company shared folder, including the report name. For example:
ReportPathandName must be URL Encoded. |
Format |
|
The report can be delivered in any of the following formats: PDF, XLSX , TXT, CSV, and MHTML. This value is not case-sensitive. |
Action |
|
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 |
|
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 |
|
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. |