在Crystal Reports上打印角色纸

阿琼·普拉卡什

我的代码在这里

private ReportDocument myReportDocument;

string reportPath = "";
crSales objRpt = new crSales();
SalesPrintModel model = new SalesPrintModel();
List<SalesPrintModel> lstSales = new List<SalesPrintModel>();
lstSales = GeneralFunctions.SALESLIST;
reportPath = Application.StartupPath + "\\crSales.rpt";
objRpt.Load(reportPath);
objRpt.SetDataSource(lstSales);
crystalReportViewer1.ReportSource = objRpt;

我想在角色纸(点阵打印机)上打印销售报告。纸张尺寸应根据要打印的行数动态设置。我找不到任何解决方案。

A

我阅读了MSDN中ReportDocument Object文章,文章表明您可以使用属性。PrintOptions

在此MSDN文章中,以下成员列出了:

  • PaperSize:设置当前打印机的纸张尺寸。
    值列在这里
  • PaperOrientation:设置当前打印机的纸张方向。
    值是DefaultPaperOrientation, Landscape, Portrait

因此,您可以使用它们来更改纸张,并可以通过如下代码找到尺寸:

if (rows >= m && rows <= n) 
   objRpt.PrintOptions.PaperSize = aPaperSize;

我知道这不是一个完整的答案,但我认为它可以为您提供帮助

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Crystal Reports 8.5双面打印

来自分类Dev

Crystal Reports“高级”布局

来自分类Dev

Crystal Reports页面编号

来自分类Dev

Crystal Reports“高级”布局

来自分类Dev

Crystal Reports动态参数

来自分类Dev

Crystal Reports - 删除回车

来自分类Dev

如何根据Crystal Reports上的数量多次打印单个字段

来自分类Dev

Crystal Reports中的过滤日期

来自分类Dev

从Crystal Reports Viewer打开pdf

来自分类Dev

Crystal Reports ReportDocument泄漏句柄

来自分类Dev

间隔问题Crystal Reports 2008

来自分类Dev

C#中的Crystal Reports

来自分类Dev

Crystal Reports ReportDocument泄漏句柄

来自分类Dev

Crystal Reports中的掩码地址

来自分类Dev

Crystal Reports:可选日期参数

来自分类Dev

Crystal Reports:专业领域翻译

来自分类Dev

Crystal Reports 中缺少参数

来自分类Dev

在Crystal Report中打印多行

来自分类Dev

Crystal Report 页脚不打印

来自分类Dev

Crystal Report 版式打印不同

来自分类Dev

服务器上的加载报告失败-Crystal Reports

来自分类Dev

Crystal Reports,将文本包装在特定字符上

来自分类Dev

Windows Server 2012上的Crystal Reports 11.5损坏

来自分类Dev

VS的Crystal Reports无法连接到Windows 10上的SQL

来自分类Dev

WSL 上的 Crystal 安装失败

来自分类Dev

哪个版本的Crystal Reports使用13.0.2000?

来自分类Dev

Crystal Reports和Visual Studio 2013预览

来自分类Dev

使用可选参数进行Crystal Reports过滤

来自分类Dev

VS2012的Crystal Reports –是否免费?