EssReportFile
Description
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);
ESS_HCTX_T | hDestCtx |
ESS_HCTX_T | hSrcCtx |
ESS_STR_T | AppName |
ESS_STR_T | DbName |
ESS_STR_T | FileName |
ESS_BOOL_T | Output |
ESS_BOOL_T | Lock |
Parameters
hDestCtx | Essbase API context handle of target database on the server.
|
hSrcCtx | Essbase 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 | Application name for report file location.
|
DbName | Database name for report file location.
|
FileName | Name of report specification file. It is not necessary to specify the file extension; the extension is understood to be .rep.
|
Output | Controls output of data. If TRUE, data is output from the server, according to the specified report. If FALSE, no data is output.
|
Lock | Controls block locking. If TRUE, all blocks which are accessed by the report specification are locked for update. If FALSE, no blocks are locked.
|
Return Value
None.
Notes
- If this function causes data to be output (Output flag
is TRUE), the returned data can be read by calling EssGetString().
- If this function causes blocks to be locked (Lock flag
is TRUE), the caller is responsible for unlocking the locked blocks
(e.g. by calling EssUpdate() with the Unlock flag
set to TRUE).
- If both the Output and Lock flags are set to
FALSE, the database merely performs a syntax check of the report
specification.
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
EssBeginReport()
EssGetString()
EssReport()
EssUpdateFile()