BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TeeChart Printing

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Mon Nov 06, 2006 11:39 pm    Post subject: TeeChart Printing Reply with quote



Hello,

I have several TChart objects that I wish to print 6 per page. I use
the Canvas->CopyRect() of my printer object and copy the contents of
each chart to the correct location using the Chart->DelphiCanvas
property. Unfortunately, I have come across a problem of a printer
dialog window printing over part of my chart.
Is there a way to get the Chart's actual bitmap or Canvas even if there
is a window over it at the time of the request? Or maybe is there a
better way to print this?

Thanks,
fakepoo
Back to top
Guest






PostPosted: Tue Nov 07, 2006 2:43 am    Post subject: Re: TeeChart Printing Reply with quote



I have created a temporary solution but I would still like to know of a
better way.

My solution:

I created a list of (Graphics::TBitmap) objects and copy the contents
of the delphicanvas into them before calling Printer()->BeginDoc().
Unfortunately, these bitmaps have a maximum size so I divided their
widths and heights by ten in order to bypass the EOutofSources error
that I was getting. After copying all of the bitmaps, I call
Printer->BeginDoc() then copy all of these bitmaps to Printer->Canvas.

Note: this method does effect the resolution which is why I would still
like to pursue alternative solutions.
Back to top
David Berneda
Guest





PostPosted: Tue Nov 07, 2006 4:33 am    Post subject: Re: TeeChart Printing Reply with quote



Hi fakepoo
Using the Chart1.PrintPartialCanvas methods allows sending multiple charts to a printer canvas without using a bitmap.

This link can be helpful, contains example code from Mr. Peter Below that uses PrintPartialCanvas:

http://groups.google.com/group/borland.public.delphi.language.delphi.general/browse_frm/thread/580a5de64bc59237/7426b3ca13d03d7d?lnk=st&q=printpartialcanvas&rnum=4#7426b3ca13d03d7d

regards
david
www.teechart.com

<fakepoo (AT) gmail (DOT) com> wrote in message news:1162834767.410451.92830 (AT) h48g2000cwc (DOT) googlegroups.com...
Quote:
Hello,

I have several TChart objects that I wish to print 6 per page. I use
the Canvas->CopyRect() of my printer object and copy the contents of
each chart to the correct location using the Chart->DelphiCanvas
property. Unfortunately, I have come across a problem of a printer
dialog window printing over part of my chart.
Is there a way to get the Chart's actual bitmap or Canvas even if there
is a window over it at the time of the request? Or maybe is there a
better way to print this?

Thanks,
fakepoo
Back to top
Guest






PostPosted: Tue Nov 07, 2006 7:53 pm    Post subject: Re: TeeChart Printing Reply with quote

Thank you so much for the reply. It now works fine and is much simpler.
~fakepoo
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Reporting-Charting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.