No chart on print preview

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Petr
Newbie
Newbie
Posts: 39
Joined: Wed Jul 24, 2013 12:00 am

No chart on print preview

Post by Petr » Thu Jun 19, 2014 1:14 pm

Hi, i want to create a print document with standard TeeChart tool, i use to draw Chart using Print(Rectangle rect) method, which i call in Print page event, which appears when i call Preview() method of TeeChart.Printer, and used to draw Chart and some extra strings. But there is no cghart on this preview, but if i try to zoom the preview, it appears. What should i do to get chart printed without zooming. I attached simple project, that reproduces problem.
Attachments
PrintProblem.rar
(31.47 KiB) Downloaded 721 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: No chart on print preview

Post by Narcís » Thu Jun 19, 2014 3:00 pm

Hi Petr,

That's similar to what I explained here. So, instead of calling:

Code: Select all

      //tChart1.Printer.Print(m_PrintRect);
you should call:

Code: Select all

      //tChart1.Printer.Print(m_PrintRect);
      System.Drawing.Imaging.Metafile m = tChart1.Chart.Metafile(tChart1.Chart, m_PrintRect.Width, m_PrintRect.Height);
      ev.Graphics.DrawImage(m, m_PrintRect, tChart1.Chart.ChartBounds, GraphicsUnit.Pixel);
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Petr
Newbie
Newbie
Posts: 39
Joined: Wed Jul 24, 2013 12:00 am

Re: No chart on print preview

Post by Petr » Fri Jun 20, 2014 9:39 am

Hi Narcis, thanks for the response, that works, but on the document appears two lines, on the left and bottom edge, how can i remove them?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: No chart on print preview

Post by Narcís » Fri Jun 20, 2014 10:11 am

Hi Petr,

Try setting the outer bevel to nothing:

Code: Select all

      tChart1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
Does this solve the problem for you?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply