4Using the ReportList Method

Using the ReportList Method

Overview of the ReportList Method

The ReportList method generates a summary list of reports in the company shared folder.

To generate the summary list of reports through this method, you need a scripting language, such as JavaScript or Perl, or a command line download tool such as Wget or cURL. The examples in this guide use the Wget tool, but the concepts are the same for all scripting languages and download tools.

The download tool calls the ReportList method and specifies the folder path for which the list of reports is to be generated. The ReportList method accesses the specified folder and creates a zip archive file containing a UTF-8 encoded CSV file with a summary list of reports. The download tool then transfers the file generated by the ReportList method and stores it in the same location from where the report list service call is made or in a location specified with the output file.

The ReportList method uses the folder access controls in Oracle CRM On Demand. The user account you use to sign on to Oracle CRM On Demand when calling the ReportList method using the download tool, determines the shared report folders you have access to.

Sequence of Operations for Using the ReportList Method

The ReportList method is not a stand-alone command. First, you must make sure you have a download tool (see About the Download Tool). Then use the following sequence:

  1. Sign on to Oracle CRM On Demand and open a cookie file (see Creating a Session Cookie File).

  2. Call the ReportList method (see Calling the ReportList Method).

  3. Close the Oracle CRM On Demand session (see Signing Off from Oracle CRM On Demand).

Calling the ReportList 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 ReportList method and get the summary list of reports.

When using Wget, the format for the call is as follows:

wget --content-on-error --load-cookie "cookiefile1.txt" --output-document "reportlist.zip" 
"https://secure-servername/OnDemand/user/ReportService?Method=ReportList&Catalog=V3&
Path=ReportFolderPath"

Substitute your specific information for the parameters shown in the following table.

Table Wget Command Parameters for Calling the ReportList 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

"reportlist.zip"

The path and file name of the zip file to be stored. 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 (optional)

Method

ReportList

This is the call to the API. The method name is ReportList.

Path

ReportFolderPath

Optional. The path to the company shared folder or a folder within the company shared folder. ReportFolderPath must be URL Encoded.

If the ReportFolderPath is not specified in the URL, then the ReportList method fetches the list of reports from the parent company shared folder. If the ReportFolderPath is specified, then the ReportList method generates the list of reports from the specified folder and sub-folders. The ReportList method always respects access permissions to folders and their contents.

Catalog

V3

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

  • V3. If V3 is specified, then the ReportList method generates a summary list of reports in the Company Wide Shared Folder of the V3 catalog.

    To generate a summary list of reports 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 ReportList method generates a summary list of reports in the Migrated Company Wide Shared Folder of the V3 catalog.

    To generate a summary list of reports in the Migrated Company Wide Shared Folder of the V3 catalog, the following privilege is required: Access Migrated Company Wide Shared Folder.

The following is a sample of a ReportList method call:

wget --content-on-error --load-cookie "cookiefile1.txt" --output-document "reportlist.zip" 
"https://secure-servername/OnDemand/user/ReportService?Method=ReportList&Catalog=V3&
Path=Sales%20Activity%20Reports"

The ReportList method generates a summary list of reports in the company wide shared folders. The ReportList method accesses each folder and creates a zip archive file containing a UTF-8 encoded CSV file with the summary list of reports. The following table shows the fields available in the summary list report.

Table Fields in the Summary List Report

Field Description

Report Name

The name of the report in the language in which it was entered.

Shared Folder Path

The company shared folder hierarchy (full path including the company shared folder name itself).

Created

The date the report was created in the format for the user's locale, not adjusted for daylight saving time.

Modified

The date the report was modified in the format for the user's locale, not adjusted for daylight saving time.

Catalog

Indicates the catalog for the report, as follows:

  • V3. The report is in the Company Wide Shared Folder of the V3 catalog.

  • V3m. The report is in the Migrated Company Wide Shared Folder of the V3 catalog.

The Created and Modified times provided by the ReportList method might be different from the times reported by other products because the ReportList method does not adjust for daylight saving time.

Troubleshooting the ReportList Method

The ReportList method can encounter problems with the command line and parameters, and also with generating report lists. The ReportList method responds to error conditions by returning an error message. To resolve a problem, see the following table.

Table ReportList Method Error Messages

Problem Cause Solution

Your ReportService request failed. The folder path is either incorrect or you don’t have permission to view the specified folder.

Incorrect folder path or insufficient access

Review the folder path provided and ensure that it is correct. Also ensure that you have sufficient permissions to access the given shared folder

Your ReportService request failed (missing folder path in parameter "Path" in method "ReportList"). Please check your syntax and try again.

Incomplete folder path

If the Path parameter is used, review that the folder path provided is complete and accurate. Otherwise leave out the Path parameter completely to get a list of all reports under the company shared folder that you have access to.

Your ReportService Report List request failed (Internal error). Please ensure that you can run the report in CRM On Demand and try again.

The ReportService encountered a problem that is not related to a parameter. Possible causes include lack of permission to the report folder, memory issues and so on.

Using Oracle CRM On Demand and the same account, try to view the shared folder. If you are able to view the folder, then check that you have not exceeded service allotments.

Your ReportService request failed (Catalog not enabled)

Analytics V2 is disabled for your company instance.

Contact your administrator.

Your ReportService request failed (Incorrect Catalog value provided; supported Catalog values are ‘V3’ or ‘V3m’). Please check your Catalog value and try again

The catalog you specified is not available.

Review the value that you specified in the Catalog parameter and specify a supported value.

Access Denied

The user account that you used to sign in to Oracle CRM On Demand to call the ReportList method does not have the appropriate privilege to access the Company Wide Shared Folder or the Migrated Company Wide Shared Folder.

Contact your administrator to get the appropriate privilege enabled for the user account.

Error messages are captured in the output file specified for the generated content in the ReportList method.