Reporter & RLIST Select List (Reporter Specific)
At 03 JAN 2000 12:24:00PM Don Miller - C3 Inc. wrote:
Hello all. Happy 2000. Does anyone know if reporter can called from a stored procedure and be passed an RList select list (either as a saved-list on an active select). If so, how is it called from a stored procedure?
TIA
Don Miller
C3 Inc.
At 04 JAN 2000 01:27AM Don Bakke wrote:
Don,
Reporter supports the GETLIST statement if you use Basic+ as your query language. You can even embed station ID references to make the statement more dynamic and user specific. There are several posted examples on this website. We never use Reporter so my syntax is a little rusty.
At 05 JAN 2000 08:23PM John Gunther, Bucks vs Bytes wrote:
Hi Don,
You can call reporter from Basic+, but there are a couple of severe restrictions, based on the fact that only one reporter and/or Basic+ program can execute at a time.
Thus, the procedure that calls reporter must end rapidly after the call in order for the latter to run successfully. The easiest way to accomplish this is to call it from a user event handler that calls reporter and then ends. Reporter then runs while the event handler's window is idling.
The same restriction means you can't call reporter twice in succession, for example to print 2 different reports (commonly needed, especially since I haven't found a way to tell it to print multiple copies of a report). For that, there's an awkward kluge described in the REVRPT article in the Knowledge Base. The workaround depends on the callback feature of the UTILITY service RUNWIN, which on my 3.7.1 systems doesn't seem to function. In another posting, I'm asking if anyone else is able to use that feature successfully.
Having reporter use a select list is done by entering a line of the form:
GETLIST
in the TOOLS-QUERY-SELECTION CRITERIA-FORMULA area of your report template. the listname is entered in caps and without quotes. If the name includes the string @STATION in it (again without quotes or other delimiters), the @station value of your computer will be substituted at run time for that string, allowing you to put your selected ids in a station-specific select list and still be found by reporter.
For example, the line GETLIST KEY_PRINT_@STATION in a report run from a computer named OFFICE, will cause reporter to use the SYSLISTS record KEY_PRINT_OFFICE as a select list for the report.
As to actually calling reporter, it can be done in different ways:
1) s1=utility('RUNWIN',reportercommandline)
2) s1=repository('EXECUTE',@appid:'*OIREPORT*RDLAYOUT*':reportname)
where the reportname value includes the .RPT extension.
Good luck. It's much harder than it should be, and reporter has a number of limitations and deficiencies that you have to get used to.
All of that said, reporter is a bundled OI tool that lets you accomplish a lot of the needed display and print work without resorting to separately purchased components. Like edittables, it (and we) suffer because it was written with a different philosophy from the rest of OI. It's yet another example of the unfulfilled Windows promise of allowing various independent programs to interact seamlessly. As it stands, if two programs weren't specifically written to work together, they don't do it very well. Maybe someday…
Forgive the tirade, I just hate the paradox that OI is superlative in enough areas that I'm forced to put up with its substandard, night killing deficiencies. I hope the above helps.
John ([email protected])