FastReport中国社区FastReport联系电话 联系电话:023-68661681

FastReport用户手册(二十二)在Delphi中创建图表并打印

来源:   发布时间:2016-08-08   浏览:4322次

如果你已经用Delphi代码在FastReport报表中创建了一个图表并希望打印该图表,你需要使用“Picture”对象。将“Picture”对象放置在报表设计页面中所需要的位置,并在Delphi代码中编写TfrxReport.OnBeforePrint事件处理程序:

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

Picture1表示“Picture”对象名称,Chart1 表示你的Delphi图表。

 

本站文章除注明转载外,均为本站原创或翻译
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:FastReport控件中文网 [https://www.fastreportcn.com/]
本文地址:https://www.fastreportcn.com/post/1219.html

联系我们
  • 重庆总部 023-68661681
购买
  • sales@evget.com
合作
  • business@evget.com


在线
客服
微信
QQ 电话
023-68661681
返回
顶部