Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2395
Printing exception.
posted

                         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?