我有一个我想要打印的reportViewer,它在我开发的PC上工作但是当我将它部署到我的客户端时它说:
An error occurredd during local report processing
。
我的代码如下:
try
{
ReportParameter[] param = new ReportParameter[12];
param[0] = new ReportParameter("p1", P1);
param[1] = new ReportParameter("p2", P2);
param[2] = new ReportParameter("p3", " ");
param[3] = new ReportParameter("p4", " ");
param[4] = new ReportParameter("p4", " ");
param[5] = new ReportParameter("p5", " ");
param[6] = new ReportParameter("p6", " ");
param[7] = new ReportParameter("p7", " ");
param[8] = new ReportParameter("p8", " ");
param[9] = new ReportParameter("p9", " ");
param[10] = new ReportParameter("p10", " ");
param[11] = new ReportParameter("p11", P11);
reportViewer1.Reset();
reportViewer1.LocalReport.ReportPath = ConfigurationSettings.AppSettings["ReportPath"].ToString();//Application.StartupPath + "\\rptReport.rdlc";
reportViewer1.LocalReport.SetParameters(param);
Export(reportViewer1.LocalReport);
Print();
this.reportViewer1.RefreshReport();
this.Close();
}
catch (Exception ex) {
if (Convert.ToBoolean(ConfigurationSettings.AppSettings["debug"].ToString()) == true)
{
MessageBox.Show(ex.Message);
}
}