DevExpress XtraReporty 无需任何 UI 交互即可打印
我在尝试从不允许 UI 交互的服务获取要打印的报告时遇到一些麻烦。
目前我可以执行以下操作,
Dim myReport As New MyXtraReport(myData)
myReport.CreateDocument()
'Then I attempt to do the following
DirectCast(myReport.PrintingSystem, PrintingSystem).Print
但是当我这样做时什么也没有发生。我没有遇到任何异常,只是没有打印任何文档。
呼唤 myReport.Print()
将通过 UI 交互打印正确的文档。我错过了什么,或者这只是不可行的。
我也尝试过使用 myReport.PritingSystem.ExecCommand(PrintDirectly) 但它也不会打印任何内容。
I am having some trouble trying to get a report to print from a service that does not allow UI interaction.
Currently I can do the following
Dim myReport As New MyXtraReport(myData)
myReport.CreateDocument()
'Then I attempt to do the following
DirectCast(myReport.PrintingSystem, PrintingSystem).Print
However nothing happens when I do this. I don't get any exceptions just no document is printed.
CallingmyReport.Print()
will print the correct document but with UI interaction. What am I missing or is this just not intended to be viable.
I have also tried using the myReport.PritingSystem.ExecCommand(PrintDirectly)
but it also doesn't print anything.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需要调用报告的打印方法:
我已经尝试过这个并且它有效。如果不起作用,我建议您在支持中心中发布示例,我们将尽力提供帮助你。
You only need to call the Report's Print method:
I've tried this and it works. If it does not work, I suggest that you post a sample in the support center and we will try to help you.