locked
How to set the Crystal Report Viewer Printer Preferences to Duplex VS 2010 / CR2010 RRS feed

  • Question

  • Using the code below I can print in duplex mode, but this does not let me view a report before printing

    How do I set the Preferences for the Printer in the Viewer Control Bar of the Crystal Report Viewer to Duplex Printing at run time rather than having to manually select Duplex through the preferences option?

    I have searched but the only example code I found produces errors in the code and will not run

    Private myReport As ReportDocument
    myReport = New ReportDocument()
    myReport.PrintOptions.PaperSize = PaperSize.PaperA4
    myReport.PrintOptions.PaperOrientation = PaperOrientation.Portrait
    myReport.PrintOptions.PrinterDuplex = PrinterDuplex. Vertical

    myReport.PrintToPrinter(3, False, 0, 0)

    In my VB6 Project that I am converting to VB.NET when I added Report.PrinterDuplex = crPRDPVertical, this allowed me to view the report and then print with Duplex without having to set the Print Preferences manualy

    How do you do the same in VS 2010 with CR2010?

    Sunday, February 20, 2011 11:05 AM

Answers

  • See this SAP forum post for more info: http://forums.sdn.sap.com/thread.jspa?threadID=1895945&tstart=0

     


    Don Williams
    • Proposed as answer by SAPDon Saturday, February 26, 2011 7:56 PM
    • Marked as answer by Larcolais Gong Tuesday, March 8, 2011 1:19 PM
    Saturday, February 26, 2011 7:56 PM