如何在ASP.Net中直接打印Crystal,C# [英] How to directly print a Crystal in ASP.Net, C#

查看:74
本文介绍了如何在ASP.Net中直接打印Crystal,C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个Crystal Report,现在我想直接打印该报表而不会弹出Crystal报表查看器。谁可以帮我这个事。我使用ASP.Net作为前端,使用C#作为后端开发。

I created a Crystal Report, now i want to print that report directly without popping up that Crystal report viewer. Can any one help me on this. I am using ASP.Net for front end and C# for backend development.

推荐答案

您可以使用 rptDoc.PrintToPrinter 直接打印水晶报告的方法。



在报告末尾添加这些行打印功能



You can use rptDoc.PrintToPrinter method to directly print crystal report.

Add these lines at the end of your report printing funtion

System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument();
rptDoc.PrintOptions.PrinterName = "Printer Name";
rptDoc.PrintToPrinter(1, true, 0, 0);





查看此文章为好吧



http://www.authorcode.com/how-to-print-crystal-report-without-report-viewer-or-any-print-dialog-in-c/ [ ^ ]


这篇关于如何在ASP.Net中直接打印Crystal,C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆