EssGetMemberCalc

Gets the calc equation for a specific member in the active database outline.

Syntax

ESS_FUNC_M EssGetMemberCalc (hCtx, MbrName, pCalcStr, pLastCalcStr);
ParameterData TypeDescription

hCtx

ESS_HCTX_T

API context handle.

MbrName

ESS_STR_T

Member name.

pCalcStr

ESS_PSTR_T

Address of pointer to receive allocated member calc string.

pLastCalcStr

ESS_PSTR_T

Address of pointer to receive allocated member last calc string.

Notes

Return Value

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

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