on 05-11-2011 9:29 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
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
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.
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.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.