Sign in to follow this  
AndyButler

Export To Excel Chart Drill Down Stops Working

Recommended Posts

Hi.

 

I have drill down charts on a page they work fine using the javascript:UpdateChart method.

 

On one chart when i click i show a datagrid with data in that works all fine

I have a button next the data grid to export to excel/csv which works fine.

This is all inside update panels.

 

I use the <Triggers>

<asp:PostBackTrigger ControlID="ibtExportToExcel" />

</Triggers>

 

tags to make it work.

 

 

 

we create the csv. and then use this to export the data.

 

Response.Charset = ""

Response.Clear()

Response.AddHeader("content-disposition", String.Format("attachment; filename={0}.csv", strName))

Response.Charset = ""

'Response.Cache.SetCacheability(HttpCacheability.NoCache) Disabled due to the error 'Internet explorer cannot download reports.aspx from www.equipmentforyou.org.uk internet explorer was not able to open this internet site

Response.ContentType = "application/vnd.csv"

 

Response.Write(swrWriter.ToString) ' Write the HTML back to the browser.

 

 

Response.End()

 

 

 

 

But when i go back to the page all the drill downs stop working and the javascripts arent be called from the charts. Other javascripts work fine.

 

 

 

 

 

Share this post


Link to post
Share on other sites

Hello, did you ever find a fix for this? We have a very similar problem where javascript drilldown stops working after exporting a chart to JPG or PDF. It works fine in Firefox, but IE8 and IE9 simply stop firing the javascript drilldown function after calling exportChart() and I don't know why.

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Could you please confirm whether you are having the issue while exporting Flash charts to images/PDF and then trying to call JavaScript function as drill down?

 

If you are using Flash charts, I am afraid, we are not able to replicate the issue using latest FusionCharts XT (V 3.3.0) Evaluation files in IE9 browser, from our end.

 

Awaiting your response!

Share this post


Link to post
Share on other sites

I have reduced the problem to a very small standalone demonstration. Please see the attached html and chart xml with instructions on how to reproduce.

 

In firefox, everything works perfectly.

 

In IE8, an error message is displayed when attempting to drilldown after clicking the "export" button ("Unspecified error" - thank you microsoft, that's very helpful).

 

In IE9, the drilldown message works perfectly until you click the export button. After exporting the image once, the drilldown button no longer does anything (no error message, just does nothing).

testchart.html

testchart.xml

post-12627-0-73577500-1360709592_thumb.png

Share this post


Link to post
Share on other sites

Can you please try using j- format of drilldown instead of javascript: ?

 

Please note that in j- format, the arguments are passed in a different format.

 

link='J-drilldown-4,OEMS Self Assessment,null'

 

Here, a string parameter "4,OEMS Self Assessment,null" is passed to the "drildown" function when it is called.

 

You can check the documentation for more on this.

Share this post


Link to post
Share on other sites

Can you please try using j- format of drilldown instead of javascript: ?

 

Yes! That fixes the problem, thank you. I'm not entirely sure why this works, though.

 

Reviewing the documentation more carefully, I find this:

 

http://docs.fusionch...nkedCharts.html

 

Note: In certain rare cases after chart export, Internet Explorer fails to invoke JavaScript functions as links using this method. So we recommend using j- method.

 

If I had seen this sooner, I may not have had this problem in the first place. The only thing I don't like about this solution is that I have to add javascript code to parse out the delimited parameters instead of getting them nicely as in my original example, but I suppose it's not a big deal.

 

Thank you.

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