PUBLIC loC as CrystalRuntime.Application, ; loR AS CrystalRuntime.Report LOCAL loV AS CrViewer.CrViewer #DEFINE loV loC = CREATEOBJECT('CrystalRuntime.Application') loR = loC.OpenReport('c:\people.rpt') *- With this being false, Refresh Report to see issue loR.EnableParameterPrompting = .F. *- Testing with Crystal Reports 8, doesn't have GetItemByName loR.ParameterFields.Item(1).AddDefaultValue(.T.) loR.ParameterFields.Item(1).AddDefaultValue(.F.) loR.ParameterFields.Item(1).AddCurrentValue(.F.) loCrystal = CREATEOBJECT('CrystalViewer') *- Make the form visible, show will return Ole error loCrystal.Visible = .T. WITH loCrystal.oleCRViewer *- Load the report loV.ReportSource=loR *- Makes form visible if it isn't already loV.ViewReport() ENDWITH *- If loCrystal.Show() here, it refreshes report *- Closing the form clears events READ EVENTS DEFINE CLASS CrystalViewer AS Form Left = 0 Height = 300 Top = 0 Width = _Screen.ViewPortWidth - (SYSMETRIC(3) * 2) WindowType = 1 ADD OBJECT oleCRViewer as OleControl WITH ; Left = 0, ; Height = 280, ; OLEClass = 'CrViewer.CrViewer', ; Top = 0, ; Width = _Screen.ViewPortWidth - (SYSMETRIC(3) * 2) ADD OBJECT chkEnableParameterPrompting AS CheckBox WITH ; AutoSize = .T., ; Caption = 'EnableParameterPrompting', ; ControlSource = 'loR.EnableParameterPrompting', ; Top = 282 PROCEDURE Destroy RELEASE loC, loR CLEAR EVENTS ENDPROC PROCEDURE RightClick *- Rightclick under the viewer on the right side of *- of the form to see report refresh This.Refresh() ENDPROC ENDDEFINE