このコードは、コードがインストールされているサーバーマシンでは正常に機能しますが、クライアントマシンからレポートを印刷しようとすると、機能しません。
この問題を解決するのを手伝ってください。
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);