var printItem = new MenuItem { Header = "Print..." };printItem.Click += (sender, e) => {
var reportSection = new EmbeddedVisualReportSection(this); var report = new Report(); report.Sections.Add(reportSection); report.Export(OutputFormat.XPS, @"c:\test.xps"); // Exports fine the entire grid. report.Print(); //throws CrossThread exception
};gridMenu.Items.Add(printItem);
What could be the reason?
As Andrew pointed out, the issue is related with Microsoft PrintDialog bug, and our Report class used it.
Sam
Yes, there are open issues. Would you mind taking a look at my post right above?
Thanks
Hello Dierk,
I wanted to check back and see if you had any questions.
Thanks,
OK, we have applied the custom fix and printing is not throwing any exceptions.
However the looks of the grids are not good.
Seems like if grid width does not fit in one page, the labels are printed very tall in all pages except last.
Are there any formating options for report?
I am attaching xps file to demonstrate what I mean. Any solutions, suggestions?
I see. I'll look deeper into and will get back to you in case.