您好,
打印的问题,我使用了一个新的方式进行,打印,我这边测试发现能够满足您的需求。
具体的方式,在asp页面上放置一个button,点击这个button时,触发以下的代码- protected void Button5_Click(object sender, EventArgs e)
- {
- string report = "UAFL_Test";
- GrapeCity.ActiveReports.PageReport report1 = null;
- report1 = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath("/Reports/" + report + ".rdlx")));
- report1.Report.DataSources[0].DataSourceReference = "";
- report1.Report.DataSources[0].ConnectionProperties.DataProvider = "OLEDB";
- report1.Report.DataSources[0].ConnectionProperties.ConnectString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};", Server.MapPath("/Data/NWind_CHS.mdb"));
- GrapeCity.ActiveReports.Document.PageDocument _reportRuntime = new GrapeCity.ActiveReports.Document.PageDocument(report1);
- GrapeCity.ActiveReports.PrintExtension.Print(_reportRuntime, true, true);
- }
复制代码 |