Executing a Report Script

A report script can be executed in one of three ways:

All of these methods send the report specification to the server for processing. The output from the server is then returned to the client, and you must read all the output from that report before calling other API functions with the same context handle.

Flowchart of typical reporting operations. BeginReport, then one or more SendStrings, then Endreport. Then one or more  Getstrings, Reports, or Reportfiles.

Control Flow of the Reporting Functions

To execute a report, you can call EsxReport() and pass the report script as a single string. Set the Output argument to TRUE and the Lock argument to FALSE unless you are performing a lock and send operation.

Alternately, call EsxBeginReport() (setting the Output and Lock arguments as above), and then call EsxSendString() to send the report script a string at a time. Finally, terminate the report sequence with a call to EsxEndReport().

To execute a report script from a file, call EsxReportFile().

To get the report output, call EsxGetString() repeatedly to read the returned strings, until a null value is returned (in C, this means a null pointer value, in Visual Basic, an empty buffer is returned).

For more detailed descriptions of all these functions, see EssReport, EssReportFile, EssBeginReport, EsbReport, EsbReportFile, and EsbBeginReport

See API Libraries.