Dim pd As New PrintDocument() pd.DefaultPageSettings.PaperSize = New System.Drawing.Printing.PaperSize("Reserved48", 280, 3276) Cmd.Connection = Con Cmd.CommandTimeout = 0 Cmd.CommandType = CommandType.Text SQL = " Select * from City " Cmd.CommandText = SQL DA.SelectCommand = Cmd DA.Fill(DS, "Rep") oReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument oReport.PrintOptions.CustomPaperSource = Dim strSystemName As String = "\\main\" Dim strPrinterName As String = "EPSONLQ-" oReport.PrintOptions.PrinterName = strSystemName & strPrinterName oReport.PrintOptions.PrinterName = printername Dim doctoprint As New System.Drawing.Printing.PrintDocument() doctoprint.PrinterSettings.PrinterName = "\\main\" '(ex. "Epson SQ-1170 ESC/P 2") Dim i As Integer oReport.Load("d:\Invoice.rpt") Response.Write(oReport.PrintOptions.PageContentHeight) Response.Write(oReport.PrintOptions.PageContentWidth) oReport.Database.Tables(0).SetDataSource(DS.Tables("Rep")) oReport.PrintOptions.PaperSize = CType(System.Drawing.Printing.PaperKind.Custom, CrystalDecisions.Shared.PaperSize) oReport.PrintToPrinter(1, False, 0, 0)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)