Senthil Murugan's Blog

Home » Apex » Create a download link for an Interactive Report

Create a download link for an Interactive Report

Thanks to ApexNinjas

The default method of downloading an Interactive Report is clicking on the Action button, then the Download button and then selecting the desired format.

For the CSV report download format:

The download link will be:

http://localhost:8080/apex/f?p=105:2:67119041146700:CSV:

For the the HTML report download format:

The download link will be:

http://localhost:8080/apex/f?p=105:2:67119041146700:HTMLD:

The download link structure is:

URL/f?p=<app_id>:<page_id>:<session_id>:<format>

The Interactive Report download link structure contains the following substitution strings:

app_id is the application id
page_id is the page id
session_id is the session id
format is the download format: CSV or HTMLD

To create a custom download link at the bottom of the Interactive Report for direct CSV download, follow these steps.

1. Create a button in the Interactive Report region.
2. Place it on the bottom of the region, aligned right, and for Action select Redirect to URL.
3. Set the URL to: http://localhost:8080/apex/f?p=&APP_ID.:&APP_PAGE_ID.:&SESSION.:CSV:

The button will be created under the Interactive Report.
Clicking it will directly open the web browser’s download window:

http://www.apexninjas.com/blog/2012/05/create-a-custom-download-link-for-an-interactive-report/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: