EssOtlGetGenNames

Retrieves all generation names specified for a particular dimension.

Syntax

ESS_FUNC_M EssOtlGetGenNames (hOutline, pszDimension, ulOptions, pulCount, pNameArray);
ParameterData TypeDescription

hOutline

ESS_HOUTLINE_T

Essbase outline handle.

pszDimension

ESS_STR_T

The dimension to retrieve generation names for.

ulOptions

ESS_ULONG_T

This can be one of the following values:

  • ESS_GENLEV_ALL—Returns default and actual generation names.

  • ESS_GENLEV_ACTUAL—Returns only generation names that are actually defined.

  • ESS_GENLEV_DEFAULT—Returns all default generation names. This includes the default names for generations that have an actual name.

  • ESS_GENLEV_NOACTUAL—Returnsdefault generation names. This includes only the generations that don't have an actual generation name.

pulCount

ESS_PULONG_T

Return of the number of elements in the pNameArray. It is the number of generation names for the specified member.

pNameArray

ESS_GENLEVELNAME_T

An array of generation name structures for the specified dimension.

Notes

Return Value

The return value is zero if the function was successful.

Example

#include <essapi.h>
#include <essotl.h>

ESS_STS_T          sts = ESS_STS_NOERR; 
ESS_HOUTLINE_T     hOutline; 
ESS_OBJDEF_T       Object;
ESS_STR_T          Dimension;
ESS_ULONG_T        GenOpt;
ESS_ULONG_T        pCount = 0, i;
ESS_PGENLEVELNAME_T pNameArray = ESS_NULL;
ESS_ACCESS_T       Access;
ESS_STR_T          AppName;
ESS_STR_T          DbName;

AppName = "Sample";
DbName = "Basic";

sts=EssSetActive(hCtx, AppName, DbName, &Access);

if (sts == 0)
{
   memset(&Object, '\0', sizeof(Object)); 

   sts = EssOtlOpenOutlineQuery(hCtx, &Object, &hOutline); 

   Dimension = "Year";
   GenOpt = ESS_GENLEV_ALL;

   if (!sts)
   {
      sts = EssOtlGetGenNames(hOutline, Dimension,
            GenOpt, &Count, &pNameArray);

      if(!sts && Count )
      {
         for(i = 0; i<Count; i++)
         {
            printf("\nNumber %ld, Name %s ", 
            pNameArray[i].usNumber, pNameArray[i].szName);
         }
         EssFree(hInst, pNameArray);
      }
   }
}

See Also