Hello,
I have a website project that prints reports fine running locally but once loaded to a webserver it starts to throw exception "Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application."
Code I'm using to print report is:
public void PrintReport(Report report, string printerName)
{
Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
InstanceReportSource instanceReportSource = new InstanceReportSource();
PrinterSettings psettings = new PrinterSettings {
PrinterName = printerName
};
instanceReportSource.ReportDocument = report;
reportProcessor.PrintReport(instanceReportSource, psettings);
}
I do need to signify exact printer to print to as well as it needs to be silent. How come this only works locally?