找回密码
 立即注册

QQ登录

只需一步,快速开始

iceman

社区贡献组

270

主题

1万

帖子

1万

积分

社区贡献组

积分
19311

活字格认证微信认证勋章元老葡萄

iceman
社区贡献组   /  发表于:2012-4-15 10:58  /   查看:5372  /  回复:0
C1Report 定制页面大小
C1Report 允许我们安装需求创建和打印 Report , Report 默认纸张大小为 A4 ,但是经常会出现打印机中的值张大小不是 A4 的情况
这篇文章将详细讲述“定制纸张大小”。
一、        定制值张大小
a)        设置 C1Report.Document  下属性DefaultPageSettings.PaperSize 。
b)        设置 “Layout.Papersize” 属性。
C1Report 设置
以下步骤描述定制 C1Report 的 PaperSize 属性
a)         设置 C1Report 下属性 “Layout.PaperSize”属性为 “PaperKind.Custom”
b)         设置 C1Report 下属性 “Layout.CustomHeight“ 和 ”Layout.CustomWidth“
代码参考:
  1. C1Report1.Layout.PaperSize = PaperKind.Custom
  2. C1Report1.Layout.CustomHeight = " "
  3. C1Report1.Layout.CustomWidth = " "
复制代码
设置C1Report Document:
以下步骤设置 PrintDocument 纸张大小
a)         创建 PrintDocument 实例,并且赋值为 C1Report.Document
b)         创建 PaperSize 实例
c)         设置 DefaultPageSettings.PaperSize 属性为 Custom Papersize。
代码:
  1. Dim PrintDoc As New PrintDocument
  2. Dim cps As New PaperSize
  3. PrintDoc = C1Report1.Document
  4. cps = New PaperSize("MyCustomPaperSize", "CustomHeight", "CustomWidth")
  5. PrintDoc.DefaultPageSettings.PaperSize = cps
复制代码
二、Demo 下载:
测试环境:
C1 Studio for Winows && VS 2010

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
您需要登录后才可以回帖 登录 | 立即注册
返回顶部