如何使用C#Asp.net直接打印水晶报表到客户机 [英] How to print crystal report directly to a client machine using C# Asp.net
问题描述
我需要打印Crystal报表页到客户端打印机的机器,而不显示报告或不显示任何对话框。
I need to print a Crystal report page to client printer machine without showing the report or without showing any dialog box.
有一点我想提的是,我知道客户端打印机的名称。
怎样的路径发送到该打印机。
One point I'd like to mention is that I know the name of Client Printer. How do I send the path to that printer.
只是要清楚的应用程序服务器上运行在远程位置。
Just to make it clear the application runs on a server machine in a remote location.
有一些类似的问题在这里,但没有任何最终解决,赞一个。
There are some similar question here , but WITHOUT any final solution,like this one.
<一个href=\"http://stackoverflow.com/questions/5378021/how-to-print-crystal-report-without-opening-the-report-in-asp-net\">how在没有打开asp.net打印报告水晶报表?
有没有这一点,我可以用一个具体的解决方案?
Is there a specific solution to this that I can use ?
推荐答案
下面一行打开打印对话框不显示打印preVIEW打印
crystalReportViewer1.PrintReport();
Below line opens up print dialog box to print without showing print preview crystalReportViewer1.PrintReport();
以下行直接发送到的ReportDocument默认打印机。
Below line directly sends reportdocument to default printer.
oReportDocument.PrintToPrinter(1,真实,0,0);
oReportDocument.PrintToPrinter(1,true,0,0);
这篇关于如何使用C#Asp.net直接打印水晶报表到客户机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!