Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing forms and Chart components

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
I am looking at developing an application that presents the user with various chart components on the screen to represent data comparisons. Ideally I want to allow the user to print these generated charts/graphs. I understand that such components can be put onto the QuickReport components and generated that way. I also understand that you are able to directly pring any given form (or portion of a form) through use of the Printer and the 'BeginDoc' and 'EndDoc' syntax.
Is anyone able to give me a headstart with this ?
Rather than me re-creating the wheel.

Thanks in advance.
Steve
 
You can use Form.Print to print your form. I have not used quickreports to print charts, though.

TealWren
 
I'm assuming that this will print the entirity of the form - is there a way to limit the area that is printed (say to just a chart component or a panel containing a number of components) ?
Thanks again.
Steve
 
If you are using a TChart component, the TChart has a method called Print. I don't have Delphi on this workstation but I believe it is something like:

var aChart:TChart
begin
set chart properties here
aChart.print;
//or aChart.printPreview;
end;

Hope this helps,
Rewdee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top