After I did a zoom on the chart, I want to print this zoomed chart. I have a print button to do this. But when I push this button, the chart is reloaded as a new chart that's zoomed once more, so did the print out image. I want the chart to be the previous one, how can I achieve this?
I had tried to modify a little bit of your GetChart.aspx.cs file to store the chartStream in a session and then get it to load to chart when do the printing, but it gives the error of: invalid binary format...
All the code I use are same with your sample, like use session variable to hold original chart stream and also the print methods.
Thanks for your help!
Jin
Print a Zoomed Chart
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
thanks but
Thanks for the reply, but this example does not use zoom at all. I think the scenerio I described is caused by using zoom. When print button does a post back, the zoom variables are submitted again so another zoom is done.
Is there someway to avoid the zoom being done again and just print out the chart of current?
thanks.
Jin
Is there someway to avoid the zoom being done again and just print out the chart of current?
thanks.
Jin
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hello,
Are you zooming programatically or letting your clients zoom within their browsers using the mouse button? If the latter, then the code in the post and hence the problem itself could be relevant.
If using the browser's print facilities (e.g. File -> Print) to print works OK with your zoomed chart, which it should, you could consider using an HTML button with JavaScript to print the page instead of an ASP.NET button and in this way you could avoid the post back.
Are you zooming programatically or letting your clients zoom within their browsers using the mouse button? If the latter, then the code in the post and hence the problem itself could be relevant.
If using the browser's print facilities (e.g. File -> Print) to print works OK with your zoomed chart, which it should, you could consider using an HTML button with JavaScript to print the page instead of an ASP.NET button and in this way you could avoid the post back.
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/