OR_VIEW - Come Home (OpenInsight Specific)
At 05 NOV 1999 03:06:26PM Don Miller - C3 Inc. wrote:
I have a problem:
In a form, I have a menu option which calls a subroutine which will do the following:
Compile a report showing specific informationCall a Report to Display / Print this informationPrompt the user to take some actionIf I call OR_VIEW to do the report, it never comes back to the subroutine on the Close Event. Any suggestions?
Don Miller
At 08 NOV 1999 11:15AM Stephen S. Revelation wrote:
Don,
Perhaps a RETURN 1 statement needs to be inserted somewhere in the process?
-Stephen
At 09 NOV 1999 09:34AM Don Miller - C3 Inc. wrote:
Stephen..
Here's a skeleton of the program:
SUBROUTINE DO_SOMETHING(VOID)
DECLARE FUNCTION MSG
DECLARE SUBROUTINE OR_VIEW
* build an R/LIST SENTENCE INTO VARIABLE CMD
CALL OR_VIEW with command buffer set
* the OR_VIEW report works just fine * when the user closes the report, perhaps * after printing, it should exit and come * back to this subroutine…
MSG.TXT=Do you want to do something?'
MSG.TXT=BNY'
* I never get here …..
Opt=MSG(@WINDOW,MSG.TXT)
… if yes button clicked then do whatever
RETURN
..
This code is hooked to a menu choice with a quick-event
to execute a stored procedure.
Don Miller
C3 Inc.
At 09 NOV 1999 04:37PM Stephen S. Revelation wrote:
Don,
I was just looking at the source for OR_VIEW and it ends with a RETURN ''. Perhaps if we changed it to 1 here? Let me know.
-Stephen
At 10 NOV 1999 09:32AM Don Miller - C3 Inc. wrote:
Stephen..
Carl Pates of Sprezz. found the problem. OR_VIEW is not executed modally (via a DIALOG_BOX call). Rather it just does a call to START_WINDOW. If it is executed in event context from a user window with a process following it's call, it does an immediate return. One way around it is (from Carl Pates) - Assuming the actual name is ORMAIN:
CALL OR_VIEW(blargh…)
Loop
While Get_Property("ORMAIN","HANDLE") ;* see if it's still alive
Call Yield() ;* let other processes continue
Repeat
Do the rest of your stuff
Don Miller