How set defaut printer in C1PrintPreview

Posted by: luis_carlosh on 26 April 2021, 10:17 am EST

  • Posted 26 April 2021, 10:17 am EST

    I can perfectly assign the default printer for a direct printing report
    Example:
    ' Load report definition
    Me.C1Report1.Load("C:\ticket\ticket2.xml", "TBLTICKET Report")
    Dim doc As PrintDocument = Me.C1Report1.Document
    'set Printer name to 'doc'
    doc.PrinterSettings.PrinterName = My.Settings.TicketPrinter
    'print
    doc.Print()

    , but I can't assign it in C1PrintPreview

    I need to see the preprint in the format of the printer that I designate, but I cannot find in which part it is achieved for preview...

    Me.C1Report1.Load("C:\ticket\ticket2.xml", "TBLTICKET Report")
    C1PrintPreviewControl1.Document = Me.C1Report1
    .....??? Where Do I set the Printer name
  • Replied 26 April 2021, 3:29 pm EST

    Hi,

    You can assign PrinterSettings to the C1PrintPreviewControl by using the PrinterSettings property of the PreviewPane of the C1PrintPreviewControl.
    Please refer to the sample attached.

    Regards.
    Avnish

    PrintPreviewPrinter.zip
  • Marked as Answer

    Replied 26 April 2021, 5:18 pm EST

    Thanks!
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels