Trying to start a report modally using Utility ("RUNWIN") (Reporting and Printing)
Created at 13 APR 1998 04:00PM
Problem: Trying to start a report modally using Utility ("RUNWIN"), you receive the error dialog: "Could not connect to OI. Check your user name and password." A second dialog also appears: "The report or query is locked by another user."
Solution: This message occurs when the reporter is being called using the following programming options. The programming code is as follows:
val = " "
* to start reporter modally
val<1> = -1
call Utility ("RUNWIN", "REPORTER.EXE
/AP=EXAMPLES /UN=EXAMPLES /RP=TEST.RPT /REP=1", val)
The documentation for the Utility function states:
"If Value <1> is a negative number, then RUNWIN will work as a 'modal' call (it will block all OpenInsight for Workgroups forms and will not return control to the caller until the calling application is completed). returnvalue is then an application exit code."
This is occurring in the example above. Since OpenInsight is 'blocked', the system attempts to connect and displays the two error messages.
The work around is to not set modality in this situation, as it does not apply. Set val = ".