We have the same in that method. Anyway, it doesn't work. I spoke with my colleague and we may want to introduce Report Manager object, which would handle previewing/printing reports using Report Listener. This may give us more control and also solve the problem I'm having with not able to close report preview window.
>Something like (I can't remember exactly what I use, becuase the project is not here rght now):
>
>lnFormToClose = 1
>FOR lnForm = 1 TO _screen.FormCount
> IF TYPE("_screen.Forms(lnFormToClose)") == "O" .AND. .NOT. ISNULL(_screen.Forms(lnFormToClose))
> IF _screen.Forms(lnFormToClose).Baseclass == "Form"
> _screen.Forms(lnFormToClose).Release()
> ELSE
> lnFormToClose = lnFormToClose + 1
> ENDIF
> ENDIF
>NEXT
>
If it's not broken, fix it until it is.
My Blog