62,046
社区成员
发帖
与我相关
我的任务
分享
string connstring = ConfigurationManager.ConnectionStrings["SqlConnectionString"].ToString() + ";Provider=SQLNCLI.1";
FastReport.TfrxReportClass report = new FastReport.TfrxReportClass();
report.LoadReportFromFile(AppDomain.CurrentDomain.BaseDirectory + "Report\\" + value);
report.SetVariable("Connstring", "'" + connstring + "'");
report.SetVariable("ID", id);
report.SetVariable("ufd1", "'" + SqlHelper.GetLinkName(CurrentUser.UserID, company) + "UFD1'");
report.SetVariable("cufd", "'" + SqlHelper.GetLinkName(CurrentUser.UserID, company) + "CUFD'");
report.PrepareReport(true);
report.PrintOptions.ShowDialog = false;
report.ShowReport();
report.PrintReport();