水晶报表,打印时出现错误提示:出现通信错误。将停止打印
Crystal提示:
打印时出现错误提示:出现通信错误。将停止打印
请教各位 如何解决 ?
单击绑定数据,点击打印出错。
private void Search()
{
string ls_mname, ls_rectype;
string ls_lotno, ls_store;
string ls_matno, ls_itmno, ls_batch, ls_ordno, ls_supply, ls_statu;
DateTime ls_tkdat1, ls_tkdat2;
string ls_szno;
ls_mname = this.tb_mname.Text.Trim();
ls_rectype = this.ddlb_rectype.SelectedValue;
ls_lotno = this.tb_sku.Text.Trim();
ls_ordno = this.tb_ordno.Text.Trim();
ls_itmno = this.tb_itmno.Text.Trim();
ls_batch = this.tb_batch.Text.Trim();
ls_szno = this.tb_szno.Text.Trim();
ls_supply = "";
ls_statu = "";
ls_matno = this.tb_matno.Text.Trim();
ls_tkdat1 = Convert.ToDateTime(Convert.ToString(this.tb_tkdat1.Text.Trim()) + " 00:00:00");
ls_tkdat2 = Convert.ToDateTime(Convert.ToString(this.tb_tkdat2.Text.Trim()) + " 23:59:59");
if (ls_rectype == "ALL")
{
ls_rectype = "";
}
this.aERP_IN = new DALOG_ERP_IN();
DataTable data = this.aERP_IN.ReadData1(ls_ordno, ls_matno, ls_batch, ls_itmno, ls_supply, ls_statu, ls_mname, ls_rectype, ls_szno, ls_lotno, ls_tkdat1, ls_tkdat2);
CrystalReportSource1.ReportDocument.Load(Server.MapPath("view_Log_Erp_In_Report_new.rpt"));
CrystalReportSource1.ReportDocument.SetDataSource(data);
CrystalReportSource1.DataBind();
CrystalReportViewer1.ReportSource = CrystalReportSource1;
}