ji123 发表于 2022-2-16 16:21:28

基于代码的区域报表怎么设置打印纸张的大小

vs中新添加一个基于代码的区域报表 SectionReport1.cs.怎么在SectionReport1.cs报表中用代码设置SectionReport1.cs 打印时的纸张大小?

Bella.Yuan 发表于 2022-2-16 17:30:30

本帖最后由 Bella.Yuan 于 2022-2-17 08:50 编辑

您好,创建SectionReport后,使用sectionReport.Printer.PaperSize.Width=XX,sectionReport.Printer.PaperSize.Height=XX,就可以进行设置,可以参考一下下面的帖子回复:activereports10区域报表怎么设置打印纸张的大小
https://gcdn.grapecity.com.cn/fo ... 41395&fromuid=65049
(出处: 葡萄城产品技术社区)


ji123 发表于 2022-2-17 08:02:54

本帖最后由 ji123 于 2022-2-17 08:04 编辑

Bella.Yuan 发表于 2022-2-16 17:30
您好,创建SectionReport后,使用sectionReport.Printer.PaperSize.Width=XX,sectionReport.Printer.PaperS ...
多谢,我试一下看能不能行

ji123 发表于 2022-2-17 08:26:57

Bella.Yuan 发表于 2022-2-16 17:30
您好,创建SectionReport后,使用sectionReport.Printer.PaperSize.Width=XX,sectionReport.Printer.PaperS ...
您好,按照如上代码,程序运行时报错 ,提示除非kind属性设置为custom否则无法更改papersize

Bella.Yuan 发表于 2022-2-17 09:18:48

您好,可以参考一下下面的这个帖子:
ar区域报表如何加载打印机自定义的纸张,在预览和打印指定预先设置好的纸张?
https://gcdn.grapecity.com.cn/forum.php?mod=viewthread&tid=28974&fromuid=65049
(出处: 葡萄城产品技术社区)
页: [1]
查看完整版本: 基于代码的区域报表怎么设置打印纸张的大小