cancel
Showing results for 
Search instead for 
Did you mean: 

CR 2008 Runtime incorrectly using default printer settings

Former Member
0 Kudos

Crystal Reports Runtime 2008 SP3 version 12.3.3.812

Windows Server 2008 R2

Progress OpenEdge 10.2B

I am having an issue printing Crystal based output. The following code is used to print the report. My issue is even though I set the printer to a non-default printer the default printer settings are still used. This seems to happen more often with Zebra printers but other printers as well.

crwReport = NEW CrystalDecisions.CrystalReports.Engine.ReportDocument().

crwReport:Load(ip-rpt-name).

crwPrinterSettings = NEW System.Drawing.Printing.PrinterSettings().

crwPageSettings = NEW System.Drawing.Printing.PageSettings().

crwReport:PrintOptions:CopyTo(crwPrinterSettings, crwPageSettings).

crwPrinterSettings:COLLATE = ip-collated.

crwPrinterSettings:Copies = ip-num-copies.

crwPrinterSettings:PrinterName = ip-printer-name.

crwReport:PrintToPrinter(crwPrinterSettings, crwPageSettings, FALSE).

What am I missing?

Thanks for the help.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello,

There was a fix for this, install Fix Pack 3.2 and then set Dissociate.. in the printer set to true as well.

Also, it was fixed in PrintOutputController and not in PrintToPrinter. Search here for samples on using the PrintOutputController.

https://smpdl.sap-ag.de/~sapidp/012002523100006341722011E/cr2008fp35.exe

Thank you

Don

Former Member
0 Kudos

What does turning ON the dissociate flag do?

Here is my new code. Did I cover everything?

crwReport = NEW CrystalDecisions.CrystalReports.Engine.ReportDocument().

crwReport:Load(ip-rpt-name).

rasPROpts = NEW CrystalDecisions.ReportAppServer.Controllers.PrintReportOptionsClass().

MYPRTOpts = NEW CrystalDecisions.ReportAppServer.ReportDefModel.PrintOptionsClass().

MYPRTOpts:PaperOrientation = crwReport:ReportClientDocument:PrintOutputController:GetPrintOptions():PaperOrientation.

MYPRTOpts:PageMargins = crwReport:ReportClientDocument:PrintOutputController:GetPrintOptions():PageMargins.

MYPRTOpts:PaperSize = crwReport:ReportClientDocument:PrintOutputController:GetPrintOptions():PaperSize.

rasPROpts:PaperSize = crwReport:ReportClientDocument:PrintOutputController:GetPrintOptions():PaperSize.

rasPROpts:PrinterName = ip-printer-name.

rasPROpts:Collated = ip-collated.

rasPROpts:NumberOfCopies = ip-num-copies.

MYPRTOpts:DissociatePageSizeAndPrinterPaperSize = TRUE.

crwReport:ReportClientDocument:PrintOutputController:ModifyPrintOptions(MYPRTOpts).

crwReport:ReportClientDocument:PrintOutputController:PrintReport(rasPROpts).

Thanks again for the help.

0 Kudos

It tells the engine to no use the default settings when the report was created and to not use the other various options.

Also, I don't recall now but it may be that it has to be turned off ( false ). It was in a read me but I never had time to test the details of the fix.

I kind of recall you may have to recreate your reports with the newer version ( patched ) to make them work properly. I'll ping Ludek, he did more testing and may recall the steps.

Thanks

Don

Former Member
0 Kudos

Thank you Don for the help. Were you able to get more details from Ludek? Any additional information would be greatly appreciated.

Thanks again.

former_member183750
Active Contributor
0 Kudos

I don't recall there being a need to recreate the reports - I'd be petty disspointed if that were the case(?).

- Ludek

Former Member
0 Kudos

Using the PrintOutputController code posted above I'm find that the printed output has a very small font size. Why would this be? Is the printed output scaling for some reason? How can I fix it?

0 Kudos

I found out Dissociate does cause scaling to happen but it is minor, by product of converting from WIN32 to Framework Printer drivers and Viewer conversions.

I have heard of a few others that this happened to but I don't recall what the fix was, it may be the video card and driver are old or could be the default printer you are using.

What size of font are you setting your objects to?

Also, check for how many gdiplus and usp10 dll's you have on your PC. GDIPlus is the extended display driver and usp10 is a Unicode conversion resource, both can affect the fonts.

Thank you

Don

Former Member
0 Kudos

The font sizes range from 8 to 10 on the document we are generating. I did have the dissociate toggle is set to No but I am going to toggle the flag to Yes and see what happens.

There is no gdiplus.dll file (only gdi32.dll) and there is one ups10.dll file. Is this typical? Were you thinking if there was more than one there would be a problem?

Thanks for the help. It is greatly appreciated.

Former Member
0 Kudos

What is the difference between using RAS PrintOutputController to print a report and opening the report in the viewer and using the viewer to print the report?

The report prints with very small font when using the RAS PrintOutputController. It prints fine when printed through the Crystal Reports 2008 runtime viewer.

Thanks.

Former Member
0 Kudos

Some additional information. The printer is a Lexmark Forms dot matrix Printer 2580. When the same document is sent to a laser printer it prints out fine. What is special about the dot matrix printer? Is there a setting I am missing? Thanks for the help.

former_member183750
Active Contributor
0 Kudos

Most dot matrix printer drivers are not Unicode compliant. CR absolutely requires that this be the case. Check with the printer manufacturer if the driver is Unicode.

- Ludek

Answers (0)