FastReport VCL程序员手册:修改报告页面的属性

FastReport VCL提供了可视化模板设计器,可以访问为30多种格式,并可以部署到云,网站,电子邮件和打印中。有时有必要从代码中修改报告页面设置(例如,修改纸张对齐方式或尺寸)。本文详细介绍了如何修改报告页面的属性。

有时有必要从代码中修改报告页面设置(例如,修改纸张对齐方式或尺寸)。本TfrxReportPage类包含以下属性,定义页面的大小:

    property Orientation: TPrinterOrientation default poPortrait;    property PaperWidth: Extended;    property PaperHeight: Extended;    property PaperSize: Integer;

该PaperSize属性设置纸张格式。这是Windows.pas中定义的标准值之一(例如DMPAPER_A4)。如果为此属性分配了一个值,则FastReport会自动填充PaperWidth和PaperHeight属性(纸张尺寸以毫米为单位)。将DMPAPER_USER(或256)值设置为格式,将意味着已设置自定义纸张尺寸。在这种情况下,PaperWidth和PaperHeight属性应手动填写。
以下示例显示了如何修改第一页的参数(假设我们已经有一个报告):
Pascal:

var  Page: TfrxReportPage;{ the first report’s page has [1] index. [0] is the Data page. }Page := TfrxReportPage(frxReport1.Pages[1]);{ modify the size }Page.PaperSize := DMPAPER_A2;{ modify the paper orientation }Page.Orientation := poLandscape;

C ++:

TfrxReportPage * Page;// the first report’s page has [1] index. [0] is the Data page.Page = (TfrxReportPage *)frxReport1.Pages[1];// modify the sizePage->PaperSize = DMPAPER_A2;// modify the paper orientationPage->Orientation = poLandscape;

如果您对FastReport感兴趣,欢迎加入FastReport QQ交流群:702295239

还想要更多吗可以点击阅读【FastReport报表2020最新资源盘点】查找需要的教程资源。让人兴奋的是FastReport .NET正在网火热销售中!>>查看价格详情

标签:

来源:慧都网

声明:本站部分文章及图片转载于互联网,内容版权归原作者所有,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2021年3月19日
下一篇 2021年3月19日

相关推荐

发表回复

登录后才能评论