Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a Crystal Report to a specific printer name

Status
Not open for further replies.

ob1kanobee

Programmer
Dec 27, 2002
47
US
HELP!!!!!

I am trying to set the printer in the crystal report to a specific printer in VB code.
The CrystalReport.PrinterName and CrystalReport.PrinterPort would be the obvious choices, but I cannot get it change.
Is there anything I need to do with the report itself in order to allow changing these properties in code?
 
Are you useing the Crystal Control ore the Crystal Report Designer?

In the designer call rptMain.SelectPrinter

 
Here is how I did it with Crystal Reports in VB. After you have designed your report you can use the following code.

Dim Report As New ReturnLabels 'Name Of Crystal Report Page

Report.SelectPrinter DriverName, PrinterName, PortName
Report.PrintOut
Set Report = Nothing

Hope it helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top