Guidelines for Using the ReportExecute Method Efficiently
The following suggestions can help you use the ReportExecute method more efficiently:
Create a folder for storing the download tool, the session cookie files, and the downloaded reports, which means you do not have to specify path names.
In the morning, execute all the Analytical (Historical) reports with the Refresh = Y parameter to calculate all the values for those reports. All remaining calls to those reports can use the Refresh = N parameter for faster processing.
Create a text file that contains copies of the common commands you use on a regular basis. You can then copy the commands from the text file and paste them on to the command line.
In the text file, create one section for all your sign on and session cookie commands and one section for the API calls.
Put a text title before each command so you can quickly identify the commands.
The following is a sample text file of commands:
ReportExecute method Commands
=== Sign On/Session Cookie Commands ===
Full Visibility Sign On:
wget --content-on-error --keep-session-cookies --save-cookies "cookiefile1.txt" --post-data
"j_username=repfullvis&j_password=pass1&langCode=ENU" https://secure-servername/OnDemand/authenticate
Supervisor Sign On:
wget --content-on-error --keep-session-cookies --save-cookies "cookiefile1.txt" --post-data
"j_username=repsuper&j_password=pass2&langCode=ENU" https://secure-servername/OnDemand/authenticate
Sales Rep Sign On:
wget --content-on-error --keep-session-cookies --save-cookies "cookiefile1.txt" --post-data
"j_username=repsales&j_password=pass3&langCode=ENU" https://secure-servername/OnDemand/authenticate
=== Report Calls ===
Sales Summary, PDF format:
wget --content-on-error --load-cookie "cookiefile1.txt" --output-document "SalesSummary.pdf"
"https://secure-servername/OnDemand/user/ReportService?Method=ReportExecute&Catalog=V3&Path=
ReportPathandName&Format=pdf&Refresh=Y" --max-redirect=100
Sales Summary, Text format with two filters:
wget --content-on-error --load-cookie "cookiefile1.txt" --output-document "SalesSummary.txt"
"https://secure-servername/OnDemand/user/ReportService?Method=ReportExecute&Catalog=V3&
Path=ReportPathandName&Format=txt&Action=Filter&P0=2&P1=eq&P2=Sales.Region&P3=7&P4=gt&P5=
Sales.Forecast&P6=10000&Refresh=Y" --max-redirect=100
Output to an Excel spreadsheet:
wget --content-on-error --load-cookie "cookiefile1.txt" --output-document "SalesSummary.xlsx"
"https://secure-servername/OnDemand/user/ReportService?Method=ReportExecute&Catalog=V3&
Path=ReportPathandName&Format=xlsx&Action=Filter&P0=2&P1=eq&P2=Sales.Region&P3=7&P4=gt&
P5=Sales.Forecast&P6=10000&Refresh=Y" --max-redirect=100