print multiple charts

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Oliver
Newbie
Newbie
Posts: 3
Joined: Thu Oct 30, 2014 12:00 am

print multiple charts

Post by Oliver » Sun Nov 02, 2014 4:12 pm

Hello,
I'm trying to print/preview two charts, which I placed on a panel. I've read the tutorial 11 "Printing multiple Charts" ff. and converted it to my project. First I got a null-pointer-Exception at the print-method (line 3). Debugging the Printer-Sourcecode showed me that the document-Field was null. I made a work-a-round by calling the method "getPrinterJob" (line 2) before I called the print-method (now the document-object was filled). After all the print only shows the left chart (tchartLeft).
Do you know where my problem is and can you explain me how to print/preview two charts?
thank you for your help,
Oliver

Code: Select all

tChartLeft.getPrinter().beginPrint();
tChartLeft.getPrinter().getPrinterJob(); // work-a-round for null-pointer-problem
tChartLeft.getPrinter().print(tChartRight.getChart().chart, new com.steema.teechart.Rectangle(100,10,300,200)); 
tChartLeft.getPrinter().print(new com.steema.teechart.Rectangle(100,300,300,200));
tChartLeft.getPrinter().endPrint();

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: print multiple charts

Post by Yeray » Tue Nov 04, 2014 1:29 pm

Hello Oliver,

We are investigating this and we'll get back to you here as soon as possible.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9622
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: print multiple charts

Post by Yeray » Mon Jan 19, 2015 2:26 pm

Hello,

Excuse us for the lack of reply here.
I've just added this to the public tracking system:
http://bugs.teechart.net/show_bug.cgi?id=1090
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply