cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal rpt for Visual studio 2010 not printing to right tray

Former Member
0 Kudos

Hi,

I am using CR 13 that comes with VisualStudio 2010.

The code I use is

genericCrystalRpt.PrintOptions.PaperSource = PaperSource.Middle

genericCrystalRpt.PrintToPrinter(1, True, 1, 0)

genericCrystalRpt.PrintOptions.PaperSource = PaperSource.Lower

genericCrystalRpt.PrintToPrinter(1, True, 1, 0)

genericCrystalRpt.PrintOptions.PaperSource = PaperSource.Middle

genericCrystalRpt.PrintToPrinter(1, True, 1, 0)

No matter what I code, it always prints to the tray 2 on the printer. I have HP Universal Printing PCL 5 driver installed for the printer.

Thanks.

Rosa.

Edited by: Rosa Leena on Apr 5, 2011 11:23 PM

Accepted Solutions (1)

Accepted Solutions (1)

Adam_Stone
Active Contributor
0 Kudos

Try taking a look at this [thread|;

Former Member
0 Kudos

Adam,

In the thread it is suggested to use PrintReportOptions.Bin or BinName

Is that a property of ReportDocument? I am not able to set that property. Kindly let me know which object the property pertains to.

FYI, I am using the below object:

Dim genericCrystalRpt As ReportDocument

Thanks.

Rosa.

Adam_Stone
Active Contributor
0 Kudos

take a look at this line from that other thread:

rpt.ReportClientDocument.PrintOutputController.PrintReport

It requires the use of the Inproc RAS object model.

Former Member
0 Kudos

Please pardon my ignorance. I have no knowledge of RAS.

The application to view and print crystal reports using visual studio .net 2010 is in User Acceptance test.

If I have to make drastic changes to the application code, it will slow down testing.

Everything else works fine -displaying, saving, except for printing to letterhead tray for a few selected reports.

I am using the following currently.

/**********************************************************************************************************************/

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.ReportSource

Imports CrystalDecisions.Shared

Dim genericCrystalRpt As ReportDocument

---

--- lines of code to set report properties etc.

---

genericCrystalRpt.PrintOptions.PaperSource = PaperSource.Lower -- the following line does not work, it always uses the same

middle tray.

/************************************************************************************************************************/

Can you send me some sample code so I can get an idea of RAS and how to use it ?

Will I be able to use both ReportDocument and RAS simultaneously ?

Thanks.

Rosa.

Adam_Stone
Active Contributor
0 Kudos

Documentation for the SDK's is [here|http://www.sdn.sap.com/irj/boc/sdklibrary]

You will want to look at the RAS SDK guide for more information on the classes that have been mentioned.

For samples that use the inproc RAS, search for "unmanaged" in the searchbox at the top of the page.

You can use both the reportdocument and reportclientdocument (RAS) in the same app, the reportclientdocument is essentially just a property of the reportdocument.

Answers (0)