sima_2n5k
سه شنبه 28 دی 1389, 10:06 صبح
سلام
من تو وب سایت(با c#) یه dataset bind کردم به کریستالم ولی وقتی بر فرض مثال میخوام روی دکمه پرینت کلیک کنم ارور میده که دوباره به دیتابیس وصل شم! چطور می تونم به این دکمه های کریستال دسترسی پیدا کنم تا dataset یه بار دیگه bind کنم؟
این کدی که نوشتم:
int errorNo = 0;
MPIS.GUI.Web.MPISServiceRef.MPISService MPService1 = (MPIS.GUI.Web.MPISServiceRef.MPISService)Applicati on["service"];
DataSet ds = MPService1.GetFinancialReport_ByProjectGrouping_Wi thOutCBS(tvSelectedTaskGuid, out errorNo);
ReportDataTable = ds.Tables[0];
ReportDocument doc = new ReportDocument();
doc.Load(Server.MapPath("/CrystalReports/Chart_ChashInPlan_ProjectGroup_WithOutCBS.rpt"));
doc.SetDataSource(ReportDataTable);
CrystalReportViewer1.ReportSource = doc;
من تو وب سایت(با c#) یه dataset bind کردم به کریستالم ولی وقتی بر فرض مثال میخوام روی دکمه پرینت کلیک کنم ارور میده که دوباره به دیتابیس وصل شم! چطور می تونم به این دکمه های کریستال دسترسی پیدا کنم تا dataset یه بار دیگه bind کنم؟
این کدی که نوشتم:
int errorNo = 0;
MPIS.GUI.Web.MPISServiceRef.MPISService MPService1 = (MPIS.GUI.Web.MPISServiceRef.MPISService)Applicati on["service"];
DataSet ds = MPService1.GetFinancialReport_ByProjectGrouping_Wi thOutCBS(tvSelectedTaskGuid, out errorNo);
ReportDataTable = ds.Tables[0];
ReportDocument doc = new ReportDocument();
doc.Load(Server.MapPath("/CrystalReports/Chart_ChashInPlan_ProjectGroup_WithOutCBS.rpt"));
doc.SetDataSource(ReportDataTable);
CrystalReportViewer1.ReportSource = doc;