I created a crystal report in vb.net 2003 that generates invoices. I need to be able to print this report to a Canon copy machine(with four paper drawers), but I can't select the paper drawer to print from at runtime, it has to print to the fourth drawer. I am using a ReportDocument object with the report source being Invoice.rpt within .NET.
Here is my current code for printing:
Public Sub PrintForm(ByVal s As String)
rdInvoice.RecordSelectionFormula = "trim({SOP10100.BACHNUMB}) = '" & s & "' and {SOP10100.SOPTYPE} in [4, 3]"
rdInvoice.Refresh()
rdInvoice.PrintOptions.PrinterName = "\\RAPCONT1\Canon iR3300 PS3"
rdInvoice.PrintOptions.PaperSource = PaperSource.Lower
rdInvoice.PrintToPrinter(1, False, 5, 5)
End Sub
Any ideas on how I can select at runtime the paper tray to print from?
Thanks in advance!