有时有必要从代码中修改 告页面设置(例如,修改纸张对齐方式或尺寸)。本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进行处理,非常感谢!