Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

TChart without TppTeeChart - I think

edited March 2004 in General
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

Comments

  • edited March 2004
    Hi Jeff,

    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;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    Sounds fine to me!

    Thanks for that.

This discussion has been closed.