I have the property "desktop" set to .t. in a form,when I call a report preview, the preview is always behind the form.
Is there anyway to change this.
See the help on the desktop property: You should not use the Desktop property when you create Single Document Interface (SDI) applications in which you might want to hide the Visual FoxPro desktop window (_SCREEN). Instead, set the ShowWindow Property setting to 2 to create a top-level form.
If you don't want to change to top level forms rather than desktop forms, you'll need to create your own preview form with desktop = .t.:
Code:
Local loPreview
loPreview = CreateObject("previewform")
loPreview.Name = "winPreview"
Report Form (Home()+"\Tools\Filespec\60frx2.frx") Preview Window winPreview
Define Class Previewform as Form
Desktop = .t.
Enddefine
The class does not need to be defined by DEFINE CLASS, you can also use a form class of a VCX or use a SCX form you first create by DO FORM, that form mustn't be modal.
The property .topform keeps the report preview on top, and enables me to keep the desk top property on the form.
An added bonus is the report preview toolbar is docked on top of the preview form.
Okay, you're doing reports in the new way rather than by Report FORM, that's good anyway. The Reportpreviewapp creates the default frxpreviewproxy, which is not really the preview form itself, but a proxy to it. Actually a nicer solution, didn't thought of it. Good!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.