如何以编程方式打印带有dat矩阵打印机页面大小的crystel报告页面。 [英] how can i print my crystel report page with dat matrix printer page size with programatically.

查看:79
本文介绍了如何以编程方式打印带有dat矩阵打印机页面大小的crystel报告页面。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何以编程方式打印带有dat矩阵打印机页面大小的crystel报告页面。

这是我的代码请帮助我...

提前致谢



`私人无效PrintReport(int BillNo)

{

试试

{

var dsReports = new customer();

rptCustomer report = new rptCustomer();



Customerfecade facade = new Customerfecade();

CustomerEntity entity = FillObject();

if(entity == null)return;



DataSet ds = null;

dsReports.Clear();

ds = facade.CustomerReport(BillNo);



for(int i = 0; i< ds.Tables [0] .Rows.Count; i ++)

{



dsReports.Customer.ImportRow(ds.Tables [0 ] .Rows [i]);

dsReports.Customer .AcceptChanges();



}

门面= null;



report.SetDataSource(dsReports);

ParameterPassignCrystal();

crpCustomer.ReportSource =报告;



if(ds!= null)

{

ds.Dispose();

dsReports.Dispose();

}

crpCustomer.PrintReport();

}

catch(exception ex)

{

Trace.WriteLine(ex.Message);

}

how can i print my crystel report page with dat matrix printer page size with programatically.
this is my code please help me...
Thanks in advance

`private void PrintReport(int BillNo)
{
try
{
var dsReports = new customer() ;
rptCustomer report = new rptCustomer() ;

Customerfecade facade = new Customerfecade();
CustomerEntity entity = FillObject();
if (entity == null) return;

DataSet ds = null;
dsReports.Clear();
ds = facade.CustomerReport(BillNo);

for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{

dsReports.Customer.ImportRow(ds.Tables[0].Rows[i]);
dsReports.Customer .AcceptChanges();

}
facade = null;

report.SetDataSource(dsReports);
ParameterPassignCrystal();
crpCustomer.ReportSource = report;

if (ds != null)
{
ds.Dispose();
dsReports.Dispose();
}
crpCustomer.PrintReport();
}
catch (Exception ex)
{
Trace.WriteLine(ex.Message);
}

推荐答案

使用 PrintOptions.PaperSize Property [ ^ ]你可以改变它。这里有一个样本

将自定义纸张尺寸设置为Crystal Report的纸张尺寸 [ ^ ]



同时查看此答案使用Crystal Report打印DotMatrix [ ^ ]
Using PrintOptions.PaperSize Property[^] you could change that. Here a sample
Set Custom Paper Size as Crystal Report's Paper Size[^]

Also check this answer Print DotMatrix Using Crystal Report[^]


这篇关于如何以编程方式打印带有dat矩阵打印机页面大小的crystel报告页面。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆