Sign in to follow this  
agreene

Calling exportChart receive prompt

Recommended Posts

The images are saving correctly. However when my finishExport is called I get a prompt saying that IE has blocked this site from downloading file. If i just execute the url being generated in finalizeExport I do not have that problem. I also do not have this problem if my report does not have any charts to process. I have even went so far as to comment out the code in FCExporter.aspx and just returned a hard coded success status and I still get the same thing. When chartObject.exportChart() is called is that synchronous? I am out of ideas. Why would it be giving me that prompt?

 

 

 

If I add the site to my trusted sites and enable automatic prompting for file downloads, I do not have this problem. However, this that not an ideal situation

 

 

 

my javascript looks like this:

 

 

 

function exportFile(type){

 

if(getElement("reportOuter") == null){

 

alert("Please search before attempting to export.");

 

return;

 

}

 

 

 

var chartObject;

 

var arrChartIDs = new Array();

 

arrCharIDs = document.getElementsByName("hidChartID");

 

 

 

for(var i = 0; i < arrCharIDs.length; i++){

 

chartObject = getChartFromId(arrCharIDs.value);

 

if( chartObject.hasRendered() ) chartObject.exportChart();

 

}

 

chartCtr = 0;

 

totalcharts = arrCharIDs.length;

 

exporttype = type;

 

 

 

if(totalcharts == 0){

 

finishExport();

 

}

 

}

 

 

 

function FC_Exported(chart){

 

if (chart.statusCode=="1"){

 

chartCtr = chartCtr + 1;

 

}else{

 

alert("The chart could not be saved on server. There was an error. Description : " + chart.statusMessage);

 

}

 

if(chartCtr == totalcharts){

 

finishExport();

 

}

 

}

 

 

 

 

 

 

 

function finalizeExport(id){

 

 

 

OpenWindow(parentURL + "/report.aspx?id=" + id + "&sessionid=" + getElement('sessionguid').value + "&export=" + exporttype + "&filterdataid=" + getElement("tempResults").innerHTML + "&visualgroups=" + serializeTable(dtVisualGroups));

 

 

 

}

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this