on 07-28-2015 2:23 PM
Hi,
I have an HP LaserJet Enterprise M605n with 6 trays. I am trying to print a report to a specific paper tray.
I used the following code, without success. can somebody help me out?
Dim printerSettings As Printing.PrinterSettings = New Printing.PrinterSettings
printerSettings.PrinterName = "\\sshmdc\Job Manager Printer"
Dim pagSett As Printing.PageSettings = New Printing.PageSettings(printerSettings)
Dim rptClientDoc As CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument = m_report.ReportClientDocument
Dim rasPROpts As CrystalDecisions.ReportAppServer.Controllers.PrintReportOptions = New CrystalDecisions.ReportAppServer.Controllers.PrintReportOptions()
Dim iBins As Integer = pagSett.PrinterSettings.PaperSources.Count
If iBins > 1 Then
rasPROpts.BinName = "Tray 2"
End If
rasPROpts.PrinterName = pagSett.PrinterSettings.PrinterName.ToString()
rasPROpts.JobTitle = "Reporting"
rptClientDoc.PrintOutputController.PrintReport(rasPROpts)
pagSett = Nothing
rasPROpts = Nothing
I am using SAP Crystal Reports Runtime engine for .NET Framework (32 bit) 13.0.13.1597
and SAP Crystal Reports, version for Microsoft Visual Studio 13.0.12.1494
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gary
Please see if the following KBA and sample app attached to the KBA will help:
1217207 - How to switch printer trays when using Crystal Reports 10 in VS .NET application
You should also update your install to SP14:
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow me on Twitter
Hi Gary,
There are new updates to CR for VS SP 14 that allows you to select the default Viewers print mode that you may want to look at also.
I wrote a sample app the requires SP 14 and also covers the trays ENUM's and other info.
Have a look at this KBA:
SAP Note 2163438 - How do I make Crystal Reports for Visual Studio print my reports?
Don
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.