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
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
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;