Skip to Content

Source code for providing Save as option on Web Report

Hi All,

My client wants to provide download options on top of report in addition to context menu options.

They want to download Web Report as CSV/text file. I tried to use following code but doesn't mee tmy requirement.

Step 1.: The Script


Insert the following script in the head of the page:

<script language="JavaScript">

// Source:

// Please leave in this header.

var isReady = false;

function doSaveAs(){

if (document.execCommand){

if (isReady){document.execCommand("SaveAs");}


alert('Feature available only in Internet Exlorer 4.0 and later.');




Step 2.: The Body Tag Interlock


Include the following onload event call in the body tag. This stops

the script from functioning until the page is fully loaded.

<body onload="isReady=true">

Step 3.: The Link


To call the script from the page and activate the SaveAs dialog,

insert a link in the page like this:

<a href="javascript:doSaveAs()">

Click Here To Save This Page


If anyone has worked on similar options please let me know.

It should take only the data and not the images. When it takes images it looks bad.

Please advice asap.

Thanks & Regards,


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 02, 2004 at 03:04 PM

    Hi Ajay,

    why not using the Web-API Command Export (Command for a data provider)?

    See online Documentation:



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.