SET_PRINTER("TERM",1) not Working as Expected (OpenInsight)
At 05 DEC 2001 05:35:44PM Loren Henry wrote:
I have a procedure that is designed to print several different reports. Each report is to be generated and previewed before the next report is processed. So the code I am using looks something like this:
stat=Set_Printer("INIT","","","",0,3)
stat=Set_Printer("TEXT", "Test 1")
stat=Set_Printer("TERM",1)
stat=Set_Printer("INIT","","","",0,3)
stat=Set_Printer("TEXT", "Test 2")
stat=Set_Printer("TERM",1)
The problem I am having is that the first report is briefly displayed in the preview window, and then instead of execution halting at the first TERM the program starts printing the second report. The end result is, you never have a chance to print the first report because it is overwritten by the second report.
This problem is occurring on a NT 4.0 workstation machine, the OIPI version is 4.0 and the OI version is 3.7.1. If anyone cold help sort this out I would appreciated it.
At 06 DEC 2001 03:33AM B Stevens wrote:
AFIK, it cant be done.
What is happening is consitant with my long use of OIPI.
Barry
At 06 DEC 2001 05:03AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Loren,
TERM will instantly kill an OIPI window, BUT What you could do is this:
1) Execute your first report
2) Go into a loop, yielding and check to see if the OIPI window is still there
3) When it's gone then call your second report on so on ..
The trick is checking to see if the OIPI window is still up - this link should help you with finding it.
We have customers who use this approach with our S/List product and it's worked well for them.
World leaders in all things RevSoft
At 06 DEC 2001 11:10AM Loren Henry wrote:
This is strange because I have never had this problem before. The piece of code I am refering to has been in use for 2 years. Recently, one of my clients moved their program to a new machine and the code stopped working.
The code works in my development version. The only way I can see this problem is to work on the clients system.
From your responses I guess I have been lucky up to this point. Thank you for taking the time to respond and I will try to use the API call.