我正在使用visual studio 2008,我遇到了水晶報表的問題。 當我點擊打印按鈕,它將我帶到沒有找到任何頁面的彈出窗口。彈出的網址是ASP.NET - 水晶報表查看器打印按鈕在ASP.NET中不工作
我已經檢查了crystalexportdialog.htm文件存在此路徑:C:\ WINDOWS \ Microsoft.NET \框架\ V2.0.50727 \ ASP.NETClientFiles \ CrystalReportWebFormViewer4 \ HTML \ crystalexportdialog。 htm
這是我在page_load事件上的代碼。
ReportDocument rptDoc = new ReportDocument();
ReportProjectProperties ds = new ReportProjectProperties();// .xsd file name
DataTable dt = DbUtility.GetProjectWorksheets(15);
ds.Tables[0].Merge(dt);
// Your .rpt file path will be below
rptDoc.Load(Server.MapPath("../Reports/report1.rpt"));
//set dataset to the report viewer.
rptDoc.SetDataSource(ds);
CrystalReportViewer1.ReportSource = rptDoc;
謝謝。