|
-
Mar 19th, 2007, 08:48 AM
#1
Thread Starter
Hyperactive Member
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)
-
Mar 21st, 2007, 01:57 PM
#2
Thread Starter
Hyperactive Member
Re: Send Printer Name CR 11
Ideas, thoughts suggestions? 
Thanks everyone!
-
Mar 21st, 2007, 02:39 PM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|