开发者

DevExpress XtraReporty Print Without any UI Interaction

开发者 https://www.devze.com 2023-02-04 04:04 出处:网络
I am having some trouble trying to get a report to print from a service that does not allow UI interaction.

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 do开发者_如何学JAVAn'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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消