>>How do I manage to specify the size of the report-preview window. I tried to find the answer in the old threads but I didn't succeed.
>
>Hi.
>See report command in vfp help file.
>REPORT FORM FileName1 ...PREVIEW [WINDOW WindowName]
>
>Denis
Just an addition, it was covered back around 6/98 under Print Preview... Here is how I control it...
At the beginning of the main program I create a form and remove some of the controls and force a maximized setting so the report never show up as half a screen.
public Rep_Preview
Rep_Preview = createobject( "form" )
With Rep_Preview
.Caption = "Report Preview"
.Closable = .F.
.Controlbox = .F.
.MaxButton = .F.
.MinButton = .F.
.Name = "MyPreviewWindow"
.WindowState = 2
.Visible = .F.
EndWith
Then when actually running the report command, just add the window name
rep_preview.visiblt = .t.
report form preview window "MyPreviewWindow"
rep_preview.visible = .f.
This way the user can never click on the top right "X" to close the window and the window will always be in the maximized state.