【发布时间】:2012-06-29 12:34:54
【问题描述】:
我使用的是 Visual Studio 2008,但水晶报告有问题。 当我单击打印按钮时,它会将我带到没有找到页面的弹出窗口。弹出网址是
我已检查该路径上是否存在 crystalexportdialog.htm 文件:C:\Windows\Microsoft.NET\Framework\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;
谢谢。
【问题讨论】:
标签: c# asp.net crystal-reports