RUN_REPORT and OECGI (OpenInsight 32-Bit)
At 09 JUL 2007 06:06:47AM Glenn Groves wrote:
I have just tried to run RUN_REPORT via OECGI, and while it appears to run - i.e. it does not crash or anything - it does not actually produce any output. It does create the file that I requested, but the file does not contain anything.
The command I have been using is: CALL RUN_REPORT('TEST','','HTMLFILE C:\Revsoft\FBTEST\TEST.HTML')
That works from a script on a form (I wanted to make certain I had the parameters right) but not when run via OECGI.
Any ideas on how to make this work via OECGI?
At 09 JUL 2007 07:55AM Bob Carten wrote:
Hi Glenn,
Run report uses OIPI, OpenInsight must run in Event Context execute OIPI commands. In Other words Oinsight.exe must be running. OECGI calls OEngine directly, without a presentation server, so Run_Report fails.
I know of a couple of workarounds, there may be some third party workarounds too.
One workaround is to have OECGI launch an Oinsight.exe to run the report.
Use ShellExecute to start Onsight.exe, pass in a command line parameter, then use the GetCommandLine WindowsApi to read the parameter, run the report.
You can do this if your web server lets you interact with the desktop.
A variant is to run a "Report Server", perhaps on a different machine. Use an OI table to buffer the requests.
The OECGI engine writes a request to the table, the Report Manager engine reads the request, runs the rpeort as PDF, writes the report filename back into the table, the OECGI engine picks up the report, passes it back.
See task manager for an example of the OECGI side. As written Task manager just launches another Oengine, however it is easily modified to call OpenInsight instead.
If you run a report server, then you have the Oengein submit tasks, the reportserver is just a window with a timer event, or the windows scheduler, which polls the queue and runs the tasks.
For tabular reports, you can use an Rlist Callback function.
I am not up to speed on third party options, though I believe some exist.
Keven Fournier of SRP posted a reference to Tony Splaver's OIPI.Net project, which looks like the real solution to the problem.
HTH
- Bob
At 09 JUL 2007 02:27PM dsig@sigafoos.org wrote:
Bob,
Wouldn't it make sense to make the reporting bits not requiring the UI bits?
It would seem that one of the important bits of a connection like OECGI would be to generate a report.
How hard would it be to remove the UI (which should be a seperate layer) from the processing?
Thanks
At 11 JUL 2007 11:43PM Bob Carten wrote:
Hi Dave,
I too thought it would be no big deal to implement OIPI without the presentation server. As I recall, for OI 8.0 we tried to write OIPI using just OleCreateInstance, OleCallMethod, OleGet/SetProperty, but could not do it, perhaps because of a need to process OLE Events from the preview window.
Has anybody worked with or tried Tony Splaver's .Net connector?
Bob
At 11 JUL 2007 11:55PM Hans Stek wrote:
Hi Bob,
In the same context, could you have a look at the thread in the JOI section?
Thanks,
Hans