EssGetMemberCalc

Description

EssGetMemberCalc() gets the calc equation for a specific member in the active database outline.

Syntax
ESS_FUNC_M EssGetMemberCalc (hCtx, MbrName, pCalcStr, pLastCalcStr);
ESS_HCTX_ThCtx
ESS_STR_TMbrName
ESS_PSTR_TpCalcStr
ESS_PSTR_TpLastCalcStr

Parameters

hCtxEssbase API context handle.
MbrNameMember name.
pCalcStrAddress of pointer to receive allocated member calc string.
pLastCalcStrAddress of pointer to receive allocated member last calc string.

Return Value

If successful, this function returns the calc string and last calc string in pCalcStr and pLastCalcStr.

Notes

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_GetMbrCalc (ESS_HCTX_T  hCtx,
                ESS_HINST_T hInst
               )
{
   ESS_FUNC_M     sts = ESS_STS_NOERR;
   ESS_STR_T     calcStr, lastCalcStr;
      
   calcStr = lastCalcStr = NULL;
sts = EssGetMemberCalc(hCtx, "Year", &calcStr, &lastCalcStr);
   if (!sts)
   {
      if (calcStr)
      {
         printf ("Outline Defined Calc Equation -- [%s]\r\n", calcStr);
      }
else
      {
         printf ("Outline Defined Calc Equation -- [Default Rollup]\r\n");
      }
            
      if (lastCalcStr)
      {
         printf ("Last Calculated Calc Equation -- [%s]\r\n", lastCalcStr);
      }
      else
      {
         if (calcStr)
            printf ("Last Calculated Calc Equation -- [%s]\r\n", calcStr);
         else
            printf ("Last Calculated Calc Equation -- [Default Rollup]\r\n");
      }
            
   }
   if (calcStr)
      EssFree (hInst, calcStr);
   if (lastCalcStr)
      EssFree (hInst, lastCalcStr);
   
  return (sts);
}

See Also

EssGetMemberInfo()
EssSetActive()