找回密码
 立即注册

QQ登录

只需一步,快速开始

liushutao

金牌服务用户

14

主题

35

帖子

99

积分

金牌服务用户

积分
99

活字格认证

liushutao
金牌服务用户   /  发表于:2016-3-17 10:55  /   查看:3062  /  回复:4
ActiveReportsPDF版的不显示界面的打印方法,可打印的大数据量,能否提供一个demo

4 个回复

倒序浏览
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-3-17 16:50:23
沙发
如电话所沟通的,先在后台导出PDF文件,然后对其进行打印。
回复 使用道具 举报
liushutao
金牌服务用户   /  发表于:2016-3-17 17:50:12
板凳
加载完数据源,在调用导出?
回复 使用道具 举报
liushutao
金牌服务用户   /  发表于:2016-3-18 15:12:38
地板
ReportService obj = new ReportService();
            dataTableList2 = dataTableList;
            GrapeCity.ActiveReports.PageReport _reportDef = obj.GetPageReport(dic["rdlx"]);
            GrapeCity.ActiveReports.Document.PageDocument _reportRuntime =
new GrapeCity.ActiveReports.Document.PageDocument(_reportDef);
            System.IO.MemoryStream ms = new System.IO.MemoryStream();
            _reportRuntime.LocateDataSource += _reportRuntime_LocateDataSource;
            // Provide settings for your rendering output.
            GrapeCity.ActiveReports.Export.Pdf.Page.Settings pdfSetting = new
            GrapeCity.ActiveReports.Export.Pdf.Page.Settings();
            GrapeCity.ActiveReports.Extensibility.Rendering.ISettings setting = pdfSetting;
            pdfSetting.PrintOnOpen = true;
            //Set the rendering extension and render the report.
            GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension pdfRenderingExtension =
            new GrapeCity.ActiveReports.Export.Pdf.Page.PdfRenderingExtension();         
            GrapeCity.ActiveReports.Rendering.IO.MemoryStreamProvider outputProvider =
new GrapeCity.ActiveReports.Rendering.IO.MemoryStreamProvider();
            _reportRuntime.Render(pdfRenderingExtension, outputProvider, pdfSetting);
            outputProvider.GetPrimaryStream().OpenStream().CopyTo(ms);                     
            return ms;

如果数据量比较大,PDF的文档就会特别慢 ,1万多条大约3分钟左右。
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2016-3-18 17:04:46
5#
非常抱歉回复晚了。
您的代码我们收到了,我们测试您的代码,看看能不能给您提供相关的demo。
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部