此代码在安装了代码的服务器机器上成功运行,但是当我尝试从客户端机器打印报告时它不起作用
请帮我解决这个问题。
CrystalDecisions.CrystalReports.Engine.ReportDocument doc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
string crptpath;
crptpath = Server.MapPath("rpt_Water_FO_Gas_Consumption.rpt");
doc.Load(crptpath);
//For Local Server
doc.SetDatabaseLogon("user_name", "password", "localhost", "ktem");
//For Online Server
//doc.SetDatabaseLogon("user_name", "password", "ip_address", "ktem");
da = new SqlDataAdapter(cmd);
dt = dbcon.filldataset(cmd);
doc.Database.Tables[0].SetDataSource(dt.Tables[0]);
CrystalReportViewer1.ReportSource = doc;
//For Print Report
CrystalReportViewer1.PrintMode.Equals(true);