Print Report windows over the current webpage

Stimulsoft Reports.WEB discussion
Post Reply
jpascual
Posts: 68
Joined: Mon Jul 12, 2010 6:45 am
Location: Palencia

Print Report windows over the current webpage

Post by jpascual »

Hello, I want to print a report directly, without opening it in the editor.
I use the code: Report.Print () and working properly, but the printer window opens in the background. How I can do to open the window over the current webpage? Is there any property for that? thanks

I've also uploaded the file to the server and does not show the screen to print, it gives a javascript error. It remains to show popups. Any solution?
this is the error:
Mensaje: Sys.WebForms.PageRequestManagerServerErrorException: No se puede mostrar un cuadro de diálogo o formulario modal cuando la aplicación no está en modo UserInteractive. Especifique el estilo ServiceNotification o DefaultDesktopOnly para mostrar una notificación de una aplicación de servicio.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Print Report windows over the current webpage

Post by Jan »

Hello,

Sorry but you can't use Print method in asp.net environment. In this case you receive PrintDialog on your webserver, not on client. If you need print report from client, you need place StiWebViewer control on asp.net webform (you can set width and height to 1). After then you need assign report to this control. After then you can call one of three methods: StiWebViewer.Print….

Thank you.
jpascual
Posts: 68
Joined: Mon Jul 12, 2010 6:45 am
Location: Palencia

Print Report windows over the current webpage

Post by jpascual »

I've done what you have told and the error is the same:
"Mensaje: Sys.WebForms.PageRequestManagerServerErrorException: 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."

My code is as follows:
report.RegData(Dataset)
StiWebViewerFx1.Report = report
StiWebViewerFx1.Report.Print()
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Print Report windows over the current webpage

Post by Jan »

Hello,

You do same things. At first you need place StiWebViewer component on page (not StiWebViewerFx, because this viewer print with help of Flash, and printing can't be started from asp.net at this moment). After this you need set width and height of this component to 1. After this you need use following code:

Code: Select all

report.RegData(Dataset);
StiWebViewer1.Report = report;
StiWebViewer1.PrintToDirect();
Thank you.
Post Reply