• 0

Printing Issues with Crystal Report in .NET


Question

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 either the third or fourth drawer. I am using a ReportDocument object with the report source being Invoice.rpt, created within .NET. Basically the user will press a button and the program will take care of everything else: refresh the report, select the printer and paper tray, and print the report.

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 = "\\path\to_printer"

rdInvoice.PrintOptions.PaperSource = PaperSource.Lower

rdInvoice.PrintToPrinter(1, False, 1, 1)

End Sub

Any ideas on how I can select at runtime the paper tray to print from? Can it be done easily, or is there an API for this. Whatever the case, I would love to see some example of how to do it.

Thanks in advance!

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.