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

RB 5.5 with Chart

edited August 2008 in General
I am running RB 5.55 with Delphi 5, running under Windows XP. Now, for
first time, I tray to building a report with a chart, but when I compile I
get the message "File not found: lEditCha.dcu ".
Where is that file? I can find it.

Alberto Hernandez M.

Comments

  • edited August 2008
    >I am running RB 5.55 with Delphi 5, running under Windows XP. Now, for

    I found an old post of mine--there's a tech tip on it.



    There is also the option of using TppImage objects in your reports and
    getting the images from charts in your app--I've posted a few samples like
    that.

    Edward Dressel
    Team DM
  • edited August 2008
    I tried with TeeChart version 8 for Delphi5, but an error appears at
    compiling time. I checked with them, and they told me I should remove
    TeeChart, ReportBuider and install again starting with TeeChart first, but
    also told me that I should check with ReportBuilder about the version of
    TeeChart that should use with RB 5.5. I will appreciate that information. I
    quote part of their answer "you should ask to Digital
    Metaphors what is the version they recommend you. Then you should uninstall
    both components, clean your search path removing references to previous
    instalations and remove previous installation files and folders of teechart
    and report builder that may remain in your "archivos de programa" folder and
    "system32" as well." end of the quote.

    I also would like to test the other alternative that you mention (using
    TppImage ),
    where do you posted the examples?

    Alberto Hernandez


    "Edward Dressel [Team DM]" escribi? en el mensaje
  • edited August 2008
    here is some sample code.

    procedure AssignChartToGraphic(aChart: TChart; const aRect: TRect; aGraphic:
    TGraphic);
    var
    lHoldShadow: boolean;
    lHoldBevel: TPanelBevel;
    lHoldColor: TColor;
    lHoldGradientVisible: boolean;
    lMetafile: TMetafile;
    lBmp: TBitmap;
    begin

    lHoldGradientVisible := aChart.Gradient.Visible;
    lHoldColor := aChart.Color;
    lHoldBevel := aChart.BevelOuter;
    lHoldShadow := aChart.Shadow.Visible;


    try
    if aGraphic is TMetafile then
    begin
    lMetafile := aChart.TeeCreateMetafile(False, aRect);
    try
    aGraphic.Assign(lMetafile);
    {$ifdef CodeSite}
    CodeSite.Send('Chart Metafile', lMetafile);
    {$endif}
    finally
    lMetafile.Free;
    end;
    end
    else
    begin
    lBmp := aChart.TeeCreateBitmap(clWhite, aRect);
    try
    aGraphic.Assign(lBmp);
    {$ifdef CodeSite}
    if CSLogging then
    CodeSite.Send('Chart Bitmap', lBmp);
    {$endif}
    finally
    lBmp.Free;
    end;
    end;
    finally
    aChart.Shadow.Visible := lHoldShadow;
    aChart.Gradient.Visible := lHoldGradientVisible;
    aChart.Color := lHoldColor;
    aChart.BevelOuter := lHoldBevel;
    end;
    end;
This discussion has been closed.