全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1341
推到 Plurk!
推到 Facebook!

FastReport 畫 DBChart 的問題

缺席
jch
中階會員


發表:111
回覆:224
積分:66
註冊:2003-12-01

發送簡訊給我
#1 引用回覆 回覆 發表時間:2006-08-31 13:30:01 IP:163.17.xxx.xxx 訂閱
請教一下各位前輩,小弟之前使用FastReport2.x版時,若要輸出DBChart到fastReport中時,只需於frReport1BeforePrint加入:
if View.Name='Chart1' then
    TfrChartView(View).AssignChart(DBChart1);
不知換成FastReport 3 該如何處理呢?
jch
中階會員


發表:111
回覆:224
積分:66
註冊:2003-12-01

發送簡訊給我
#2 引用回覆 回覆 發表時間:2006-09-06 12:53:50 IP:163.17.xxx.xxx 訂閱

沒有前輩可以幫幫忙嗎?拜託!

chinyu
高階會員


發表:12
回覆:157
積分:153
註冊:2002-06-14

發送簡訊給我
#3 引用回覆 回覆 發表時間:2006-09-14 10:45:36 IP:220.140.xxx.xxx 未訂閱

new method for fr3

use a pictureview object instead.

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;

chart with fixed data

Create a chartview, enter its editor and create one series. Set the series to "Fixed data".
Now you can write the following in the chart.onbeforeprint:

with Chart1.SeriesData[0] do
begin
XSource := 'a;b;c';
YSource := '1;2;0';
end;

系統時間:2024-05-17 11:21:58
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!