EssOtlQueryGetNextDimension

Returns the next dimension handle of the dimension in the outline opened in query mode.

Syntax

ParameterData TypeDescription

hOutline;

ESS_HOUTLINE_T

Handle to the outline (input)

hDim;

ESS_HMEMBER_T

The dimension handle (input)

phNextDim;

ESS_PHMEMBER_T

The handle of the next dimension (output)

Notes

Return Value

Returns 0 if successful; otherwise, returns an error.

Example

ESS_FUNC_M ESS_ISUniqMemberNameWithinDimatGenLev()
{
 ESS_STS_T    sts = 0;
 ESS_HOUTLINE_T   hOutline;
 ESS_OBJDEF_T   Object;
 ESS_APPNAME_T   szAppName;
 ESS_DBNAME_T   szDbName;
 ESS_OBJNAME_T   szFileName; 
 ESS_HMEMBER_T   hDim,hNextDim;
 ESS_BOOL_T    pbNameUnique, bGen = ESS_TRUE;
 ESS_USHORT_T   usGenLevel = 3;
 

 memset(&Object, '\0', sizeof(Object));
 Object.hCtx =   hCtx;
 Object.ObjType =  ESS_OBJTYPE_OUTLINE;
 strcpy(szAppName, "Demo");
 strcpy(szDbName, "Test"); 
 strcpy(szFileName, "Test");
 Object.AppName =  szAppName;
 Object.DbName =   szDbName;
 Object.FileName =  szFileName;
 

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

 if (!sts)
 {
  sts = EssOtlQueryGetFirstDimension(hOutline, &hDim);
    
  if (sts)
   printf("EssOtlQueryGetFirstDimension failed sts %ld\n",sts);
 }
 

 if (!sts)
 {
   sts =  EssOtlIsMemberNameUniqueWithinDimAtGenLevel (hOutline, hDim, bGen, usGenLevel, &pbNameUnique);
   if (sts)
    printf("EssOtlIsMemberNameUniqueWithinDimAtGenLevel failed sts %ld\n",sts);
   else
    printf("pbNameUnique is %d\n", pbNameUnique);
 }
 
     if (!sts)
  {
  sts = EssOtlQueryGetNextDimension (hOutline, hDim, &hNextDim);
    
  if (sts)
   printf("EssOtlQueryGetFirstDimension failed sts %ld\n",sts);
  }
 

 if (!sts)
 {
   sts =  EssOtlIsMemberNameUniqueWithinDimAtGenLevel (hOutline, hNextDim, bGen, usGenLevel, &pbNameUnique);
   if (sts)
    printf("EssOtlIsMemberNameUniqueWithinDimAtGenLevel failed sts %ld\n",sts);
   else
    printf("pbNameUnique is %d\n", pbNameUnique);
 }
 
 
 
 return sts;
}

See Also

  • EssOtlQueryGetFirstDimension