EssReport

Description

EssReport() sends a report specification to the active database as a single string. This function is equivalent to making a call to EssBeginReport(), followed by calls to EssSendString() and finally EssEndReport(). The report data can either be output, or the report specification can just be verified and any errors returned. Also, the corresponding data blocks in the database can optionally be locked by this call (lock for update).

Syntax

ESS_FUNC_M  EssReport (hCtx, Output, Lock, RptSpec);
ESS_HCTX_ThCtx
ESS_BOOL_TOutput
ESS_BOOL_TLock
ESS_STR_TRptSpec

Parameters

hCtxEssbase API context handle.
OutputControls output of data. If TRUE, data is output from the server, according to the specified report. If FALSE, no data is output.
LockControls block locking. If TRUE, all blocks which are accessed by the report specification are locked for update. If FALSE, no blocks are locked.
RptSpecThe report specification, as a single string (must be less than 64 Kbytes)..

Return Value

None.

Notes

Access

This function requires the caller to have read privilege (ESS_PRIV_READ) to one or more members in the active database. Any members that the caller does not have access to will be returned as missing.

Example

ESS_FUNC_M
ESS_ReportLine (ESS_HCTX_T       hCtx,
                ESS_HINST_T  hInst
               )
{
   ESS_FUNC_M       sts = ESS_STS_NOERR;
   ESS_STR_T     rString;
   
   sts = EssReport (hCtx, ESS_TRUE, ESS_FALSE,
         "<Desc Year !");
   /******************
    * Get the report *
    ******************/
   
   if (!sts)
      sts = EssGetString (hCtx, &rString);
   while ((!sts) && (rString != NULL))
   {
         printf ("%s", rString);
      EssFree (hInst, rString);
      sts = EssGetString (hCtx, &rString);
   }
   printf ("\r\n");
   
   return (sts);
}

See Also

EssBeginReport()
EssEndReport()
EssGetString()
EssReportFile()
EssUpdate()