Hi Jill, this is what I am using to achieve the same:
Local oPreview, oListener
Do (_ReportPreview) With oPreview
oPreview.TopForm = .T.
oListener = NewObject("ReportListener")
oListener.ListenerType = 1
oListener.PreviewContainer = m.oPreview
Report Form stock_rpl Object oListener
oListener.CommandClauses.Prompt = .T.
oListener.PreviewContainer.oForm.WindowState = 2
Cheers,
Luis
>Hi,
>
>I have an application with a single SDI form. The form is 320 x 971.
>
>Now i am adding a button to generate a report, and want the print preview to be outside the form, to display a full screen for the user.
>
>I used the following to generate the report:
>
>
> DEFINE WINDOW DBWindow AT 1,1 Size 40, 120 TITLE "Details" IN DESKTOP CLOSE FLOAT GROW
> REPORT form DropBoxRevenueAndGRDetails.FRX PREVIEW WINDOW DBWindow
>
>
>And it kind of works when i run the screen directly in VFP.
>
>But when i generate the exe and run it from there, "nothing happens" (the report is not displayed).
>
>The report is generated fine, if the code is just:
>
>
> REPORT form DropBoxRevenueAndGRDetails.FRX PREVIEW
>
>
>but it displays inside my small 320 x 971 window.
>
>is there a way i can display the report in a large size?
>
>Thanks for any input!
>
>J
I never forget a face, but in your case I will make an exception :-)