How To Crystal Report option that directly print to the printer in the network

How To Crystal Report option that directly print to the printer in the network
Share it:

How to Crystal Report option that directly prints to the printer in the network



How to Crystal Report option that directly prints to the printer in the network

The following source code simply prints a file using vb.net that directly print to the network printer. If you wanted to try this code, you are required to install SAP Crystal Reports and Visual Studio 2010. However, in VS2010 required a configuration. try this source code, you almost succeed.

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

Public Class Form1
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Dim report As New ReportDocument
        report.PrintOptions.PrinterName = "\\cpc-7e894b46ad8\Canon iP1900 series"
        report.Load("C:\Users\P@ssw0rd\Documents\Visual Studio 2010\Projects\Testing Print\Testing Print\CrystalReport1.rpt", OpenReportMethod.OpenReportByDefault)
        report.PrintToPrinter(1, False, 0, 0)
    End Sub
End Class

Share it:

CRYSTALREPORTS

VB.NET

Windows Forms

Post A Comment:

0 comments: