DevExpress XtraReporty打印没有任何UI交互 [英] DevExpress XtraReporty Print Without any UI Interaction

查看:472
本文介绍了DevExpress XtraReporty打印没有任何UI交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我可以执行以下操作:

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.

调用
myReport.Print()

将打印正确的文档,但使用UI交互。我还没有想到这是不是可行的。

will print the correct document but with UI interaction. What am I missing or is this just not intended to be viable.

我也尝试使用 myReport.PritingSystem.ExecCommand(PrintDirectly),但它也不打印任何东西。

I have also tried using the myReport.PritingSystem.ExecCommand(PrintDirectly) but it also doesn't print anything.

推荐答案

您只需要调用报告的打印方式:

You only need to call the Report's Print method:

new XtraReport1().Print();

我已经尝试过,它的工作原理。如果不起作用,建议您在支持中心中发布示例,我们将尽力帮助你。

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.

这篇关于DevExpress XtraReporty打印没有任何UI交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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