>How do you do it?
I didn't do it. Honest!
Just kidding.
Create a blank form (this can be done programattically in the same code that shows the preview, but I use it so much I have it predefined to save time.) Make the form a child of the top-level form. When you preview the report, preview it into the form, like this....
LPARAMETER llPrint
IF llPrint
REPORT FORM myReport TO PRINT PROMPT NOCONSOLE
ELSE
DO FORM myPreview NAME oPreview LINKED
IF TYPE("oPreview") = "O" .AND. !ISNULL(oPreview)
WITH oPreview
.showwindow = 1
.caption = "My Caption"
.windowstate = 2
.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.
In your situation, where you have a tiny top-level form. You will probably have to add code to maximize the TLForm before displaying myPreview, then return the TLForm to its normal state when the preview closes.
Hope this helps, let me know how you make out.
regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.comNo trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.