问题描述
如何打印水晶报告而不在C#windows应用程序中打开任何对话框。
i创建了一个报告,我想打印没有水晶报表查看器的水晶报表。
报告创建的代码是:
RecoveryJobDataSet rjDS = 新的 RecoveryJobDataSet();
rjDS.Tables [ 0 ]。Rows.Add( 100000111 , Vivek, 100000 );
rjDS.Tables [ 0 ]。Rows.Add( 1000002222 , Omkar, 70000 );
rjDS.Tables [ 0 ]。Rows.Add( 1000003333 , Kapil, 100000 );
DataTable dt = new DataTable();
dt = rjDS.Tables [ 0 ];
CrystalReport1 report = new CrystalReport1();
report.SetDataSource(dt);
CrystalReportViewer1.ViewerCore.ReportSource = report;
我尝试过:
RecoveryJobDataSet rjDS = new RecoveryJobDataSet();
rjDS.Tables [0] .Rows.Add(100000111,Vivek, 100000);
rjDS.Tables [0] .Rows.Add(1000002222,Omkar,70000);
rjDS.Tables [0] .Rows.Add( 1000003333,Kapil,100000);
DataTable dt = new DataTable();
dt = rjDS.Tables [0];
CrystalReport1报告=新的CrystalReport1();
report.SetDataSource(dt);
CrystalReportViewer1.ViewerCore.ReportSource = report;
how to print the crystal report without opening any dialog in C# windows application.
i have created a report, i want to print crystal report without crystal report viewer.
report created code is:
RecoveryJobDataSet rjDS = new RecoveryJobDataSet(); rjDS.Tables[0].Rows.Add(100000111, "Vivek", 100000); rjDS.Tables[0].Rows.Add(1000002222, "Omkar", 70000); rjDS.Tables[0].Rows.Add(1000003333, "Kapil", 100000); DataTable dt = new DataTable(); dt = rjDS.Tables[0]; CrystalReport1 report = new CrystalReport1(); report.SetDataSource(dt); CrystalReportViewer1.ViewerCore.ReportSource = report;
What I have tried:
RecoveryJobDataSet rjDS = new RecoveryJobDataSet();
rjDS.Tables[0].Rows.Add(100000111, "Vivek", 100000);
rjDS.Tables[0].Rows.Add(1000002222, "Omkar", 70000);
rjDS.Tables[0].Rows.Add(1000003333, "Kapil", 100000);
DataTable dt = new DataTable();
dt = rjDS.Tables[0];
CrystalReport1 report = new CrystalReport1();
report.SetDataSource(dt);
CrystalReportViewer1.ViewerCore.ReportSource = report;
这篇关于如何打印水晶报表而不在c#windows应用程序中打开任何对话框。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!