Default Printer Printing Help

Stimulsoft Reports.NET discussion
Post Reply
Chan Kuan Leang
Posts: 74
Joined: Sun May 20, 2007 9:14 pm
Location: Singapore

Default Printer Printing Help

Post 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
Smile
Chan Kuan Leang
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Default Printer Printing Help

Post 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.
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

Default Printer Printing Help

Post 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.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Default Printer Printing Help

Post 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.
Chan Kuan Leang
Posts: 74
Joined: Sun May 20, 2007 9:14 pm
Location: Singapore

Default Printer Printing Help

Post 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
Smile
Chan Kuan Leang
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Default Printer Printing Help

Post 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.
Chan Kuan Leang
Posts: 74
Joined: Sun May 20, 2007 9:14 pm
Location: Singapore

Default Printer Printing Help

Post 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.
Smile
Chan Kuan Leang
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Default Printer Printing Help

Post by Edward »

Yes, it is possible.

Here you are:

Code: Select all

Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Me, Report)
Thank you.
Chan Kuan Leang
Posts: 74
Joined: Sun May 20, 2007 9:14 pm
Location: Singapore

Default Printer Printing Help

Post 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:
Smile
Chan Kuan Leang
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Default Printer Printing Help

Post by Edward »

Please let us know if you need any help.

Thank you.
Post Reply