Direct Printing
-
- Posts: 14
- Joined: Wed Jun 01, 2022 8:26 am
Direct Printing
I am trying to print directly from my Report (without having to view a preview)
I have create a Report and loaded the report but when I call :
Report.Print();
It throws an Exception error :
System.NullReferenceException: 'Object reference not set to an instance of an object.
Should just calling Print() allow the end user to select the printer and other options ?
I have create a Report and loaded the report but when I call :
Report.Print();
It throws an Exception error :
System.NullReferenceException: 'Object reference not set to an instance of an object.
Should just calling Print() allow the end user to select the printer and other options ?
-
- Posts: 577
- Joined: Tue Sep 07, 2021 10:11 am
Re: Direct Printing
Hello,
You can use the following code:
Thank you.
You can use the following code:
Code: Select all
StiReportResponse.PrintAsPdf(report);
-
- Posts: 14
- Joined: Wed Jun 01, 2022 8:26 am
Re: Direct Printing
I tried this after loading my report
StiReportResponse.PrintAsPdf(report);
and nothing happened.... no print or preview or request to save as......
StiReportResponse.PrintAsPdf(report);
and nothing happened.... no print or preview or request to save as......
-
- Posts: 14
- Joined: Wed Jun 01, 2022 8:26 am
Re: Direct Printing
Okay, I have found this in the manual : (even though I have a Report Viewer on this page)
StiBlazorHelper.Initialize(JsRuntime);
If I do this first the PDF is displayed n the web browser.
I don't want this, i want to send the PDF to a printer directly not to preview it first
StiBlazorHelper.Initialize(JsRuntime);
If I do this first the PDF is displayed n the web browser.
I don't want this, i want to send the PDF to a printer directly not to preview it first
-
- Posts: 577
- Joined: Tue Sep 07, 2021 10:11 am
Re: Direct Printing
Hello,
Please clarify, is the printer connected on the client side or on the server side?
Thank you.
Please clarify, is the printer connected on the client side or on the server side?
Thank you.
-
- Posts: 14
- Joined: Wed Jun 01, 2022 8:26 am
Re: Direct Printing
The printer is on the client side
-
- Posts: 577
- Joined: Tue Sep 07, 2021 10:11 am
Re: Direct Printing
Hello,
Due to the browser security limitations, in the web browsers, it is not possible to send printers settings in print dialog menu.
Thank you.
Due to the browser security limitations, in the web browsers, it is not possible to send printers settings in print dialog menu.
Thank you.