Hi,
Using VB and the RDC I'm having real problems with printing reports. Heres the story.
User selects printer
Ori = rptMain.PaperOrientation
Call rptMain.SelectPrinter("", strPrinterName, ""
Calling this resets the PaperOrientation
If Ori <> CRDefaultOrientation Then
rptMain.PaperOrientation = Ori
End If
rptMain.PrintOut
This produces a seriously messed up print out, all the text is a garbled mess.
Now, the line in Red is where it all goes wrong. When you select the printer and then set .PaperOrientation it all goes wrong. We fixed this problem in another location by selecting the printer and orientation before we exported the report and some saved data to a *.rpt file.
This code is for reloading and printing that report at a later date, but selecting the printer will garble the report again. We could re-export the report to another file, but thats crap and we're not going to do that.
Two possible solutions I have but can't implement wthout help
1) In Crystal Reports, you can refresh a report from the saved data, how can you do this programatically? (Will force Crystal to re-draw the data, thus fixing the garbage print out?)
2) Does anybody have or know where I can find the latest version of the Crystal Automation Print Engine, CPEAUT32.DLL? On the Crystal support site is states that this file has a problem when you call .SelectPrinter and then .PaperOrientation (it GPF's), same cause, different symptoms maybe?
Or any other solutions will be nice ;-)
Cheers,
Jim.
Using VB and the RDC I'm having real problems with printing reports. Heres the story.
User selects printer
Ori = rptMain.PaperOrientation
Call rptMain.SelectPrinter("", strPrinterName, ""
If Ori <> CRDefaultOrientation Then
rptMain.PaperOrientation = Ori
End If
rptMain.PrintOut
This produces a seriously messed up print out, all the text is a garbled mess.
Now, the line in Red is where it all goes wrong. When you select the printer and then set .PaperOrientation it all goes wrong. We fixed this problem in another location by selecting the printer and orientation before we exported the report and some saved data to a *.rpt file.
This code is for reloading and printing that report at a later date, but selecting the printer will garble the report again. We could re-export the report to another file, but thats crap and we're not going to do that.
Two possible solutions I have but can't implement wthout help
1) In Crystal Reports, you can refresh a report from the saved data, how can you do this programatically? (Will force Crystal to re-draw the data, thus fixing the garbage print out?)
2) Does anybody have or know where I can find the latest version of the Crystal Automation Print Engine, CPEAUT32.DLL? On the Crystal support site is states that this file has a problem when you call .SelectPrinter and then .PaperOrientation (it GPF's), same cause, different symptoms maybe?
Or any other solutions will be nice ;-)
Cheers,
Jim.