> >* Method PrintReport() >LPARAMETER llPrint > >IF llPrint && Send report to printer > REPORT FORM myReport TO PRINT PROMPT NOCONSOLE >ELSE && preview the report > > *-- Instantiate the report screen > DO FORM myPreview NAME oPreview LINKED > > IF TYPE("oPreview") = "O" .AND. !ISNULL(oPreview) > WITH oPreview > .showwindow = 1 && in top level form > .caption = "My Caption" > .windowstate = 2 && maximized > .visible = .T. > REPORT FORM myReport PREVIEW WINDOW "myPreview" > .release() > ENDWITH > ELSE > REPORT FORM myReport PREVIEW > ENDIF >ENDIF > >RETURN>That's all there is to it.