TChart without TppTeeChart - I think
I have a TChart on a form and I simply want to print that chart on a
ReportBuilder report. I don't want to have to use a TppTeeChart and try
recalculating the graph. I simply want to take the chart that I already have
print it out. I'm not sure how to do this. Am I able to use a TppTeeChart
and do an assign from one to the other?
Thanks
Jeff
ReportBuilder report. I don't want to have to use a TppTeeChart and try
recalculating the graph. I simply want to take the chart that I already have
print it out. I'm not sure how to do this. Am I able to use a TppTeeChart
and do an assign from one to the other?
Thanks
Jeff
This discussion has been closed.
Comments
The easiest way to do this (in my opinion) is to convert the chart to a meta
file using the TeeChart.TeeCreateMetaFile, then loading that image directly
to a TppImage component on a report.
var
lMeta: TMetaFile;
liWidth: Integer;
liHeight: Integer;
begin
liWidth := MyChart.Width;
liHeight := MyChart.Height;
lMeta := MyChart.TeeCreateMetaFile(True, Rect(0, 0, liWidth, liHeight));
ppImage.Picture.Graphic := lMeta;
end;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for that.