DevExpress XtraReporty Print Without any UI Interaction

一曲冷凌霜 提交于 2019-12-13 03:43:20

问题


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.

Calling myReport.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.


回答1:


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.



来源:https://stackoverflow.com/questions/4660178/devexpress-xtrareporty-print-without-any-ui-interaction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!