本文介绍了如何以编程方式打印带有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);
}

推荐答案


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

06-10 01:18