Results 1 to 3 of 3

Thread: Send Printer Name CR 11

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2007
    Posts
    307

    Send Printer Name CR 11

    I am using vb2005 and printing a crystal report.
    I have the printer name saved in an ini file.

    Curious how i force the printer to a specified printer?

    Here is my code now.

    Code:
     Dim reportPath As String = "c:\report6.rpt"
                crystalreport = New ReportDocument()
                crystalreport.Load(reportPath)
                crystalreport.PrintToPrinter(1, False, 1, 99)

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2007
    Posts
    307

    Re: Send Printer Name CR 11

    Ideas, thoughts suggestions?

    Thanks everyone!

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Send Printer Name CR 11

    Doesn't anyone rtfm anymore.

    The documentation for the PrintToPrinter method indicates the report is sent to the printer specified in the PrintOptions.PrinterName property. So simply

    Code:
    Dim reportPath As String = "c:\report6.rpt"
    crystalreport = New ReportDocument()
    crystalreport.Load(reportPath)
    crystalreport.PrintOptions.PrinterName = Your Printer Name
    crystalreport.PrintToPrinter(1, False, 1, 99)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width