Print a Zoomed Chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Beige
Newbie
Newbie
Posts: 25
Joined: Wed Jun 28, 2006 12:00 am

Print a Zoomed Chart

Post by Beige » Wed Aug 02, 2006 7:47 pm

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

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Thu Aug 03, 2006 8:08 am

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/

Beige
Newbie
Newbie
Posts: 25
Joined: Wed Jun 28, 2006 12:00 am

thanks but

Post by Beige » Thu Aug 03, 2006 7:10 pm

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

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Fri Aug 04, 2006 6:39 am

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.
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/

Beige
Newbie
Newbie
Posts: 25
Joined: Wed Jun 28, 2006 12:00 am

thanks

Post by Beige » Fri Aug 04, 2006 6:42 pm

Thanks for the message. I make it work by updaing session variable to hold always the latest chart. The javascript print works too but it also prints other info on the page, this way will print the chart only.

regards,
Jin

Post Reply