Download Parallel Crystal Developers Manual

Transcript
There are a variety of output formats. To produce HTML, code:
Report.ExportToHTML "c:\temp\out.html"
<Check for Errors>
Normally, outputs should be directed into the Web Server area, so that the end-user can
be given access via an URL to see the results in the browser. ExportToHtml is a MAS
invention, which makes a number of API calls to the Report Engine on your behalf to set
up an Export structure appropriate for HTML and to run the report. So if there is any
reason that the report cannot run successfully on the Report Server, this method call is
going to fail. Check that the report is safe by first running it in the Seagate Designer on
the report server. The only other common problem is to supply an illegal file name for the
HTML, which produces the misleading error message "Disk full" from a system dll.
Finally, we need to close the Report Engine, disconnect from the Report Engine machine,
and free the Automation Server objects. This is all done for you in a single call.
App.DisconnectFromReportServer()
This call:
•= Closes any open jobs.
•= Closes the Report Engine.
•= Shuts down your PCREServer process on the Report Server.
•= Closes the CORBA network connection.
•= Releases the objects from the report object down that have been created directly or
indirectly by your script.
Note that in the nature of COM objects, they may not actually be freed and returned to
the heap until the object variables declared in your script go out of scope and the script
interpreter also 'releases' them. However, NO use should be made of the objects from
report down after the Disconnect call. The connection and the report engine are gone!
In order to perform further report processing, you must run the script again or execute
another pcreApp.ConnectToReportServer() call which provides you with a new Report
Engine and set of objects.
Remember - Parallel Crystal customises and runs a report, but the report must be
designed and first tested in the Seagate CRW Designer. If the report does not run in the
Seagate Designer, then it is not going to run in Parallel Crystal. The Seagate Designer
should be installed on the Report Server, and whether you develop the report there or
bring in a functioning report from another machine, the next step is to check that the
report runs on the Report Server machine using the designer.
Parallel Crystal Developer's Manual
Version 2.4 - Revised 5/27/00
319