Fred Posted April 25, 2007 Report Share Posted April 25, 2007 I'm using .Net RenderFormat. How about background image? Thanks Fred Link to comment Share on other sites More sharing options...
Frank Posted April 25, 2007 Report Share Posted April 25, 2007 There is a background property in the Chart class. You can set it at design time, through the Wizard and at run-time. For more details please review the documentation on the ImageBackground class. Link to comment Share on other sites More sharing options...
Fred Posted April 25, 2007 Author Report Share Posted April 25, 2007 Thank you Frank. The next question is: can I add the background image only when users try to print the chart? Thanks. Fred Link to comment Share on other sites More sharing options...
Frank Posted April 30, 2007 Report Share Posted April 30, 2007 That gets tricky because the Print is done in the client. There is no property that will add a background only to print. By default the chart prints with no background. You can theoretically do this by changing the chart right before printing, then changing it back, however this may cause some flickering. I have never done anything like this client-side, an honestly I don't know whether JavaScript has everything needed to achieve this. Link to comment Share on other sites More sharing options...
Fred Posted April 30, 2007 Author Report Share Posted April 30, 2007 Thanks Frank. How do you print the chart on the client? Will it just pop up the printdialog? Any samples? Thanks. Link to comment Share on other sites More sharing options...
Frank Posted May 1, 2007 Report Share Posted May 1, 2007 Calling Chart.Printer.Print from your JavaScript will print the chart. Link to comment Share on other sites More sharing options...
Fred Posted May 3, 2007 Author Report Share Posted May 3, 2007 I got error: "Class doesn't support Automation" When I call Chart1.Printer.Print from my client side javascript. I'm using IE6 on Windows XP sp2. Any Thoughts? Thanks. Fred Link to comment Share on other sites More sharing options...
Frank Posted May 3, 2007 Report Share Posted May 3, 2007 1) Make sure your chart is called Chart1 2) If you are using MainClient (UseMainClient is set to true) then you must add:Chart1.Chart.Printer.Print Link to comment Share on other sites More sharing options...
Fred Posted May 3, 2007 Author Report Share Posted May 3, 2007 Hi Frank, I tried both but none of them works. I don't know where to set UseMainClient. Here is what my javascript code: var chart1 = document.getElementById('<%= Chart1.UniqueID%>'); var chart1 = document.getElementById('<%= Chart1.UniqueID%>');//chart1.Chart.Printer.Print; chart1.Printer.Print; Thanks. Fred Link to comment Share on other sites More sharing options...
Fred Posted May 10, 2007 Author Report Share Posted May 10, 2007 Hi Frank, What security setting should I apply to make the print work? Calling Chart1.Printer.Print still gives me "Automation is not support" error. Thanks. Fred Link to comment Share on other sites More sharing options...
Fred Posted May 11, 2007 Author Report Share Posted May 11, 2007 It works when I granted FullTrust to ChartFX assemblies. Thanks for your help Frank. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.