Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 05 JAN 2000 05:12:29AM John Gunther, Bucks vs Bytes wrote:

Happy Y2K everyone!

I'm into unfathomable difficulties trying for the first time to run a series of reports. I need to print a series of different forms from the same select list. Because of the conflict between Basic+ and reporter.exe, this can't be done straightforwardly, so I'm using a method derived directly from the REVRPT solution in the Knowledge Base.

The problem is that after running the first report successfully, the callback to my subroutine is apparently never executed by RUNWIN. I thought perhaps this was due to some problem or corruption in my report template, but creating a new, utterly simple one didn't solve the problem. The templates all run fine independently.

I pared down the code to the essentials to troubleshoot this, but the callback is apparently still not being issued. Here is the simplified code. Any ideas? Thank you in advance, ladies and gentlemen.

The series of reports are printed by clicking a Print button whose CLICK event is as follows:

* ids=

open 'SYSLISTS' to hSysLists then

write ids to hSysLists, 'KEY_PRINT_':@STATION then /*save the selected ID's as a select list*/

reportlist=ORDER.RPT":@vm:"REMIT.RPT":@vm:"FACTORY.RPT" ;*the 3 reports to run, all use the select list just created
s1=runrevrpt(reportlist,@window:'',write$)

end

end

return

REPORTER.EXE is actually executed by the RUNREVRPT subroutine:

function runrevrpt(reportlist)

!ACTION: run 1 or more Revelation Reporter reports without locking up OI

!ARGS:

! REPORTLIST: an @vm-delimited list of report names to run

!RETURNS: null

!USAGE: Call from event context, then quickly end event handler. Required since Reporter won't run while any Basic+ script is running.

declare function send_event, utility

rptlist=reportlist

rpt=rptlist ;*next report to run

rptlist=delete(rptlist,1,1,0) ;*remaining reports

if len(rpt) then /*run the next report*/

* build command line to execute this report

Cmd=REPORTER.EXE /UN=%1 /AP=%2 /RE /RP=%3 /PR /QU"

swap "%1" with @username in Cmd

swap "%2" with @appid in Cmd

swap "%3" with Rpt in Cmd

* set up callback to execute the next report

Callback =1

Callback=RUNREVRPT'

Callback=rptlist ;*remaining reports

s1=Utility("RUNWIN", Cmd, Callback) ;* execute the report

end else /*all reports have run, close calling window*/

s1=Send_Event(@window, 'CLOSE')

end

return ''


At 05 JAN 2000 09:43AM Stephen S. Revelation wrote:

John,

Maybe it's possible to do what you desire from a DOS batch file. Just run each report using /reporter.exe with appropriate switches for report name, selection criteria, etc. This could all be executed with OpenInsight using Utility("RUNWIN", "x:\xxx.bat").

Just a thought.

-Stephen


At 05 JAN 2000 07:38PM John Gunther, Bucks vs Bytes wrote:

I'm afraid RUNWINing a batch file with successive REPORTER calls won't work. Each REPORTER instance will be started without regard to whether prior ones have finished. Since only one REPORTER instance can successfully run at a time, the batch file approach doesn't solve the problem.

The basic question is whether others can successfully use the RUNWIN callback feature in OI 3.7.1. I'm having the same problem on 2 different Win 98 systems. I'd like to know if it's just me or if others encounter the same problem with that feature.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/f73e577ef6d9cc2d8525685d0038131e.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1