Hi All,
I just have a quick question about programmatically setting the paper tray that a Crystal Report prints to using Visual Basic .NET 2005 (The Crystal Reports version is the version that is included with Visual Studio 2005). The code I've used is as follows:
- Dim ProductionCopy As New rptProductionCopy
-
-
ProductionCopy.SetDataSource(ProductionDataSet)
-
-
ProductionCopy.PrintOptions.PrinterName = "HP LaserJet 4050 PCL6"
-
ProductionCopy.PrintOptions.CustomPaperSource = "Tray 1"
-
-
ProductionCopy.PrintToPrinter(1, True, 0, 0)
I looked up how to do this online about a month ago, and the websites I looked at said that this was the way to set the paper tray that a printer prints to. However, whenever this program code executes, the program sends the print job through Tray 2 for some reason. Is this the correct cody to use to set a different Printer Tray, or are there other, better ways to get this done?
Thanks in advance!