Page 1 of 1
Default Printer Printing Help
Posted: Tue Mar 25, 2008 9:11 pm
by Chan Kuan Leang
I am using stiWebReport & stiWebViewer, version Stimul Reports.Net 2007.1
How do I default the printing direct to the default printer?
I had try using .PrintToDirect() in the page load. But, it always lead me to Print Preview.
Is there any Notes or FAQ teaching me how to do this?
Thanks
Smile :biggrin:
chankl78
Default Printer Printing Help
Posted: Wed Mar 26, 2008 1:55 am
by Edward
Unfortunately there is no such a commandto print directly from the StiWebViewer.
But if you render your report as pdf file via the following command:
Code: Select all
StiReportResponse.ResponseAsPdf(this, report)
then printing is possible without additional window and WYSIWYG is guaranteed as well.
Thank you.
Default Printer Printing Help
Posted: Wed Mar 26, 2008 2:53 am
by Stéphane
Hello,
I don't know well the stiWebReport class but if you do
Code: Select all
stiWebReport.GetReport().Print(false)
or
stiWebViewer.Report.Print(false)
it should print directly to the default printer, isn't it ?
Cordially,
Kakone.
Default Printer Printing Help
Posted: Wed Mar 26, 2008 3:26 am
by Edward
chankl78 wrote:I am using stiWebReport & stiWebViewer, version Stimul Reports.Net 2007.1
How do I default the printing direct to the default printer?
I had try using .PrintToDirect() in the page load. But, it always lead me to Print Preview.
Possible ways for printing are presented in the WebDemo example application from the standard delivery.
Please show your code as you trying to print from the stiWebViewer class.
Thank you.
Default Printer Printing Help
Posted: Wed Mar 26, 2008 3:43 am
by Chan Kuan Leang
Edward wrote:chankl78 wrote:I am using stiWebReport & stiWebViewer, version Stimul Reports.Net 2007.1
How do I default the printing direct to the default printer?
I had try using .PrintToDirect() in the page load. But, it always lead me to Print Preview.
Possible ways for printing are presented in the WebDemo example application from the standard delivery.
Please show your code as you trying to print from the stiWebViewer class.
Thank you.
Code: Select all
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Report As Stimulsoft.Report.StiReport = rwModuleHC.GetReport()
wvModuleHC.Report = Report
wvModuleHC.PrintToDirect()
End Sub
The code is as above.
Smile
chankl78
Default Printer Printing Help
Posted: Wed Mar 26, 2008 4:26 am
by Edward
Yes, the code is correct, but unfortunately it is not possible to print without this popup window.
The html representation of the report can be slightly different from the preview window.
If the report must be printed from the StiWebViewer, than also possible to represent it in pdf format via the following command:
Code: Select all
StiReportResponse.ResponseAsPdf(this, report);
Thank you.
Default Printer Printing Help
Posted: Wed Mar 26, 2008 4:50 am
by Chan Kuan Leang
Edward wrote:Yes, the code is correct, but unfortunately it is not possible to print without this popup window.
The html representation of the report can be slightly different from the preview window.
If the report must be printed from the StiWebViewer, than also possible to represent it in pdf format via the following command:
Code: Select all
StiReportResponse.ResponseAsPdf(this, report);
Thank you.
Thank you for the advice.
Is it possible to have it in VB code?
Thanks.
Default Printer Printing Help
Posted: Wed Mar 26, 2008 5:06 am
by Edward
Yes, it is possible.
Here you are:
Code: Select all
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Me, Report)
Thank you.
Default Printer Printing Help
Posted: Wed Mar 26, 2008 9:53 am
by Chan Kuan Leang
Edward wrote:Yes, it is possible.
Here you are:
Code: Select all
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Me, Report)
Thank you.
Thank you so much. :biggrin:
Default Printer Printing Help
Posted: Wed Mar 26, 2008 9:56 am
by Edward
Please let us know if you need any help.
Thank you.