>I tryed your favorite technique a long time ago and it is not works then. That;s why I use KB. May now it is works?
I didn't try it for a long time, because for more than a year all my reports are Excel automation.
Here's a corrected version:
oForm=create("form")
oForm.caption="my report preview"
oForm.windowState=2
oForm.visible=.t.
REPORT FORM stuff\try.FRX PREVIEW WINDOW (oForm.name)
I forgot several things:
- remove on key label afterwards
- OKL is actually unnecessary - ESC will close it anyway.
- form needs to be made visible, or else the window doesn't maximize. I thought this can be circumvented by defining the form as a class with .windowstate=2, but no cigar there.
- and, most important, not "IN WINDOW", but just "WINDOW". The difference is huge - with the "IN" keyword, the preview window is created as a child window in the defined window, i.e. the defined window behaves like a MDI. Without the "IN" keyword, the preview window is equal to the defined window.