[Crystal Report 8.5] methods printersetup() and selectprinter()

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




http://www.craigberntson.com/Articles/kb014.htm

Printing could be the most often performed function for a report. Here’s the code to do this:

LOCAL oCR AS CRAXDRT.Application
LOCAL oRpt AS CRAXDRT.Report

oCR = CREATEOBJECT(“CrystalRuntime.Application”)
oRpt = oCR.OpenReport(“C:\Temp\Taz.RPT”)
IF oRpt.HasSavedData
oRpt.DiscardSavedData()
ENDIF
oRpt.PrintOut()

Two other methods of interest are PrinterSetup( ) and SelectPrinter( ). PrinterSetup( ) lets you programmatically change printers. SelectPrinter( ) displays the Print Setup dialog.


I can't find nor invoke them. Are they available in version after 8.5 only?

--
iTech Consulting Co., Ltd.
Website: http://www.itech.com.hk (IE only)
Tel: (852) 2325 3883 Fax: (852)2325 8288
.