EssGetDefaultCalc
Description
EssGetDefaultCalc() gets the default calc script for the
active database.
Syntax
ESS_FUNC_M EssGetDefaultCalc (hCtx, pCalcScript);
ESS_HCTX_T | hCtx |
ESS_PSTR_T | pCalcScript |
Parameters
hCtx | Essbase API context handle. |
pCalcScript | Address of pointer to receive allocated calc script string.
|
Return
Value
if successful, this function returns the default calc script for
the database in pCalcScript.
Notes
- The returned calc script string will be less than 64 Kbytes
long.
- The memory allocated for pCalcScript should be freed
using EssFree().
Access
This function requires the caller to have at least read access
(ESS_PRIV_READ) to the database, and to have selected it as their
active database using EssSetActive().
Example
ESS_FUNC_M
ESS_GetDefaultCalc (ESS_HCTX_T hCtx,
ESS_HINST_T hInst
)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_STR_T cstr = NULL;
sts = EssGetDefaultCalc(hCtx, &cstr);
if (!sts)
{
if (cstr)
{
printf ("Default Calc Script --\r\n%s\r\n", cstr);
EssFree (hInst, cstr);
}
}
return (sts);
}
See
Also
EssDefaultCalc()
EssSetActive()
EssSetDefaultCalc()
EssSetDefaultCalcFile()