Returns the number of members in a dimension whose names are duplicate in the outline opened in query mode.
Syntax
ESS_FUNC_M EssOtlGetDimensionNameUniqueness (hOutline, hDim, *pulDupCount);| Parameter | Data Type | Description |
|---|---|---|
hOutline | ESS_HOUTLINE_T | Outline context handle (input). |
hDim | ESS_HMEMBER_T | Input dimension, returned by EssOtlQueryGetFirstDimension() or EssOtlQueryGetNextDimension(). |
*pulDupCount | ESS_ULONG_T | The number of members with duplicate names (output). |
Notes
A shared member in the dimension will not influence the count.
Before you call this function, call EssOtlOpenOutlineQuery to open the outline in query mode.
Return Value
Returns 0 if successful; otherwise, returns an error.
Example
ESS_FUNC_M ESS_GetCount()
{
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;
ESS_LONG_T pulDupCount;
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)
{
// returns pulDupCount which gives the number of members in a dimension
// whose names are duplicate
sts = EssOtlGetCountOfDupMemberNameInDim (hOutline, hDim, &pulDupCount);
if (sts)
printf("EssOtlGetCountOfDupMemberNameInDim failed sts %ld\n",sts);
}
return sts;
}See Also