Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top