lparameters tlForceShutDown local lcOnShutdown _screen.mousepointer = MOUSE_HOURGLASS *----------------------------------- *--- Close all applications forms *----------------------------------- if wexist('Report Designer') release windows 'Report Designer' && try to close report preview window endif with this if not .oForms.CloseAllForms(tlForceShutDown) return .f. endif if vartype(.oUserLogMgr) == 'O' *----------------------------------------------------------------- *-- Close the entry in the user log *----------------------------------------------------------------- .LogUserActivity("Logout") .oUserLogMgr.release() endif if vartype(.oRecordMgr) == 'O' *----------------------------------------------------------------- *-- Unlock any records the user may have open. *----------------------------------------------------------------- .oRecordMgr.UnlockAll(.cUserid) .oRecordMgr.release() endif *----------------------------------------------------------------- *-- Release the timer and run the parent code. *----------------------------------------------------------------- .ReleaseDesktopTimer() .ReleaseAbstractFactory() .ReleaseDBCMgr() *---------------------- *-- Restore the caption *---------------------- _screen.caption = .cOldMainWindCaption set message to "" *------------------------------------- *-- Restore the setting of ON SHUTDOWN *------------------------------------- lcOnShutdown = .cOldOnShutdown on shutdown &lcOnShutdown .ReleaseSplash() .ReleaseToolbar() .ShowVFPToolbars() .oErrorMgr = .null. .ReleaseMenu() .ReleaseDesktopImage() .ReleaseChildren() .ReleaseGlobalEnvironmentObj() *--- If the Connection Manager exists, release it if vartype(.oConnectionMgr) == "O" .oConnectionMgr.release() endif close data all clear events *-------------------------------------------------- *-- Indicates that the Cleanup method has already *-- been run. *-------------------------------------------------- .lIsClean = .t. _screen.mousepointer = MOUSE_DEFAULT clear program endwithWould you please post how do you call preview for your reports, I think we need to incorporate it the same way. Also please check my other today's message about returning .f. from AddChildren. I already made the change in the cChildCollection.Init method.