参见他的FAQ
2.26. How to make the TChart with several series?
You can'tdo
this in designer. You need to write some code in Delphi.
Create TChart or TDBChart, fill it out;
put the empty TfrChartView to the report;
write the following code in the TfrReport.OnBeforePrint event handler:
if View.Name = 'Chart1' then
TfrChartView(View).AssignChart(your_Delphi_chart)
我找到的,已试过可用,不用1000元了。
使用FastReport建立TChart/TDBChart非常容易,首先使用Delphi建立统计图表,然后在您的报表加入Chart元件,最後在TfrReport.OnBeforePrint事件指定統計图表至报表。參考如下:
-------------------
procedure TForm1.frReport1BeforePrint(Memo: TStringList;
View: TfrView);
begin
if View.Name = 'Chart1' then
begin
// 建立统计图
// 指定统计图給FastReport
TfrChartView(View).AssignChart(DBChart1);
end;
end;
---------------------
procedure TForm1.frReport1BeforePrint(Memo: TStringList;
View: TfrView);
begin
if View.Name = 'Chart1' then
begin
// 建立统计图
// 指定统计图給FastReport
TfrChartView(View).Assignto(DBChart1);
end;
end;
-------------------
procedure TForm1.frReport1BeforePrint(Memo: TStringList;
View: TfrView);
begin
if View.Name = 'Chart1' then
begin
// 建立统计图
// 指定统计图給FastReport
TfrChartView(View).Assignchart(DBChart1);
end;
end;