lparam lcFullCommand && an assign event will parse lcFullCommand into this.reportname and this.partcommand if param()=1 this.fullcommand=lcFullCommand else error 'no report name was passed' endif THIS.VISIBLE=.T. lcCommand='report form '+this.reportname+' '+this.partcommand+' noconso preview in window printpreview ' &lcCommand this.releaseThis works fine and the SDI window is released when the report is closed.
IF WEXIST("Print Preview") MOVE WINDOW "Print Preview" TO 10,10 MOUSE DBLCLICK AT 11,11 ENDIFHowever this requires a NOWAIT command to be inserted into the REPORT command line.