crApp=createobject("crystalruntime.application") crReport=createobject("crystalruntime.report") crReport=crApp.openreport(V_CRfile) crReport.Database.Tables.Item(1).Location=V_Table crReport.PrinterSetup(0) DO FORM vw_cryst WITH vw_cryst .caption = V_CRfile .addobject('crviewer1','olecontrol','crviewer.crviewer') WITH .crViewer1 .height=vw_cryst.height .width=vw_cryst.width .visible=.t. .EnableRefreshButton = .F. .EnableGroupTree = .F. .DisplayGroupTree = .F. .reportsource=crReport .ViewReport =MESSAGEBOX("Processing completed. You may view the report, or you may print from the preview window.") ENDWITH ENDWITHThe form is just a simple empty form, with this code in the Resize method:
WITH This.crviewer1 .height =This.height .width =This.width ENDWITHHope this helps!