Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Geting an SDI form to close after Report Preview
Message
From
07/09/2001 10:56:26
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Geting an SDI form to close after Report Preview
Miscellaneous
Thread ID:
00553800
Message ID:
00553800
Views:
56
I am trying to create a simple class for previewing a report in an SDI form.

I have an SDI form class that accepts a the name of a report as a parameter.
in a method of the form I have the following.
lparam lcFullCommand && an assign event will parse lcFullCommand into this.reportname and this.partcommand
if param()=1
	this.fullcommand=lcFullCommand
else
    error 'no report name was passed'	
endif

THIS.VISIBLE=.T.
lcCommand='report form '+this.reportname+' '+this.partcommand+' noconso preview in window printpreview '
&lcCommand
this.release
This works fine and the SDI window is released when the report is closed.
However I want my 'Print Preview' Toolbar to always be docked.

Most of the threads I can find suggest something like the following
IF WEXIST("Print Preview")
MOVE WINDOW "Print Preview" TO 10,10
MOUSE DBLCLICK AT 11,11
ENDIF
However this requires a NOWAIT command to be inserted into the REPORT command line.

As you can see from above if I use NOWAIT then my SDI form will close.

How can I tell my form to only close if the report preview window is not visible or how can I dock the toolbar and keep my method how it is.
Next
Reply
Map
View

Click here to load this message in the networking platform