EssReportFile

Sends a report specification to the active database from a file. 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  EssReportFile (hDestCtx, hSrcCtx, AppName, DbName, FileName, Output, Lock); 
ParameterData TypeDescription

hDestCtx

ESS_HCTX_T

API context handle of target database on the server.

hSrcCtx

ESS_HCTX_T

API context handle for report file location. The report file can reside on the client or on the same server as the target database. If the report file is on the client (local), the local context must be created with EssCreateLocalContext.

AppName

ESS_STR_T

Application name for report file location.

DbName

ESS_STR_T

Database name for report file location.

FileName

ESS_STR_T

Name of report specification file. It is not necessary to specify the file extension; the extension is understood to be .rep.

Output

ESS_BOOL_T

Controls output of data. If TRUE, data is output from the server, according to the specified report. If FALSE, no data is output.

Lock

ESS_BOOL_T

Controls block locking. If TRUE, all blocks which are accessed by the report specification are locked for update. If FALSE, no blocks are locked.

Notes

Return Value

None.

Access

This function requires the caller to have read privilege (ESS_PRIV_READ) to one or more members in the active database.

Example

ESS_FUNC_M
ESS_ReportFile (ESS_HCTX_T  hCtx,
                ESS_HINST_T hInst
            )
{
   ESS_FUNC_M    sts = ESS_STS_NOERR;
   ESS_HCTX_T   hSrcCtx;
   ESS_STR_T    rString;
   ESS_STR_T    AppName;
   ESS_STR_T    DbName;
   ESS_STR_T    FileName;
      
   hSrcCtx = hCtx;
   AppName = "Sample";
   DbName  = "Basic";
   FileName = "Test";
      
   sts = EssReportFile (hCtx, hSrcCtx, AppName,
         DbName, FileName, ESS_TRUE, ESS_FALSE);
   /* Get the report */
   if (!sts)
      sts = EssGetString (hCtx, &rString);
   while ((!sts) && (rString != NULL))
   {
      printf ("%s", rString);
      EssFree (hInst, rString);
      sts = EssGetString (hCtx,&rString);
   }
   return(sts);
}

See Also