Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.
Dim PrinterSettings As New System.Drawing.Printing.PrinterSettings Dim doc1 As ReportDocument Dim trayName As String Dim RptSource As System.Drawing.Printing.PaperSource Dim numberCopies as integer = 1 doc1.Load(reportLocation) printerName = "name of the printer" trayName = "Tray 3" PrinterSettings.PrinterName = printerName doc1.PrintOptions.PrinterName = printerName 'Loop through trays of the specific printer For Each RptSource In PrinterSettings.PaperSources If RptSource.SourceName.ToString.ToUpper = trayName.ToUpper Then doc1.PrintOptions.CustomPaperSource = RptSource doc1.PrintToPrinter(numberCopies, False, 0, 0) End If Next
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
17 Experts available now in Live!