TfrxChartView Questions FR2.5x - FR3.x

TChart questions.

1.Can the chart object use data from a memo field similar to how it was done FR 2.5x?


2. Can the TChart Component included with Delphi7 be used in FR3 reports? The code below shows how I was able to do this in FR2.5x. Is something similar available?

Create a Chart in your Delphi code.
Drop a chart component on your report.

Then in TfrReport.OnBeforePrint event you assign your
TChart to the
report Chart

procedure TForm1.frReport1BeforePrint(Memo:
TStringList; View: TfrView);
begin
if View.Name = 'Chart1' then
begin
// Prepare your Delphi Chart
// Assign Delphi Chart to FastReport chart
TfrChartView(View).AssignChart(DBChart1);
end;
end;

____________________________

Thanks,
Brent

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 12:36PM
    Hi brent you can't assign directly as of ver 3.03 you have to use a picture view and generate a wmf.

    procedure TForm1.frxReport1BeforePrint(Sender: TfrxReportComponent);
    begin
    if Sender.Name='Picture1'then
    TfrxPictureView(Sender).Picture.Assign(form2.Chart1.TeeCreateMetafile(False,
    Rect(0, 0, Round(Sender.Width), Round(Sender.Height))));
    end;

    ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.