EssGetString
Description
EssGetString() gets a string of data from the active database.
This function should be called after EssReport() or EssEndReport()
if data is returned.
Syntax
ESS_FUNC_M EssGetString (hCtx, pString);
ESS_HCTX_T | hCtx |
ESS_PSTR_T | pString |
Parameters
hCtx | Essbase API context handle. |
pString | Address of pointer to receive allocated returned data string.
|
Return
Value
An allocated pointer to the data string is returned in pString.
This pointer will be NULL if there is no more data to be returned.
Notes
- Calling this function other than after successfully executing
a report will generate an error.
- The returned string will be less than 64 Kbytes long.
- Always include the carriage return/line feed with this command
or errors will result.
- You must call EssGetString() until it returns a NULL
string.
- The memory allocated for pString should be freed using
EssFree().
Access
This function requires no special privileges.
Example
ESS_FUNC_M
ESS_Report (ESS_HCTX_T hCtx,
ESS_HINST_T hInst
)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_STR_T rString = NULL;
sts = EssBeginReport (hCtx,ESS_TRUE,ESS_FALSE);
if (!sts)
sts = EssSendString (hCtx, "<Desc Year !");
if (!sts)
sts = EssEndReport (hCtx);
/**************
* Get 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
EssEndReport()
EssReport()
EssQueryDatabaseMember()