Put the following code in the PrintButtonClicked event
ThisForm.oReport.PrinterSetup(0)
DODEFAULT(.T.)
>Sorry, I post the previous message accidently.
>
>I Question is how to enable user select printer from the Crystal Report Viewer before they print out the report.
>
>
>TIA.
>
>
>My Code :
>
>=SYS(2333,1)
>THIS.Caption = mTitle
>THIS.oCrystalReports = CREATEOBJECT('CrystalRuntime.Application')
>THIS.oReport = CREATEOBJECT('CrystalRuntime.Report')
>THIS.oReport = THIS.oCrystalReports.OpenReport(mReport)
>THIS.addObject('oleCRViewer','oleControl','crViewer.crViewer')
>THIS.oleCRViewer.EnableExportButton = .T.
>THIS.resize
>THIS.oleCRViewer.ReportSource = THISFORM.oReport
>THIS.oleCRViewer.ViewReport()
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer