如何通过单击按钮打印水晶报表 [英] how to print a crystal report by clicking a button

查看:76
本文介绍了如何通过单击按钮打印水晶报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过单击Windows应用程序窗体中的按钮来打印水晶报表?
请提供解决方案

how to print a crystal report by clicking a button in a windows application form?
please give a solution

推荐答案

此链接中将包含很多信息:
http://social.msdn.microsoft.com/论坛/en-CA/vscrystalreports/thread/875b7ea2-c6ed-4c43-b02d-11b593bf55f7 [
There would be lots of information in this link:
http://social.msdn.microsoft.com/Forums/en-CA/vscrystalreports/thread/875b7ea2-c6ed-4c43-b02d-11b593bf55f7[^]

So good luck :)




看到此链接:
http://msdn.microsoft.com/en-us/library/aa691452.aspx [ ^ ]
也许这段代码已经可以使用了:
Hi,

see this link:
http://msdn.microsoft.com/en-us/library/aa691452.aspx[^]
Maybe this code already works:
CrystalDecisions.CrystalReports.Engine.ReportDocument report = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
string repName = null;
repName = CrystalReportSource1.ReportDocument.FileName;
report.Load(repName); 
report.PrintToPrinter(1, false, 0, 0); 


这篇关于如何通过单击按钮打印水晶报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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