EssOtlSetMemberInfo

Description

EssOtlSetMemberInfo() sets member attribute information.

Syntax

ESS_FUNC_M EssOtlSetMemberInfo (hOutline, hMember, pInfo);
ESS_HOUTLINE_T hOutline
ESS_HMEMBER_T hMember
ESS_PMBRINFO_T pInfo

Parameters

hOutlineOutline context handle
hMemberHandle to member to set attributes for
pinfoMember information structure

Return Value

Returns 0 if successful; otherwise one of the following:

OTLAPI_BAD_CONSOL
OTLAPI_BAD_MBRNAME
OTLAPI_BAD_MEMBER
OTLAPI_ERR_ADDNAMEUSED
OTLAPI_ERR_CURTOOMANYDIMS
OTLAPI_ERR_BADSHARE
OTLAPI_ERR_BADSKIP
OTLAPI_ERR_BADSTORAGE
OTLAPI_ERR_BADSTORAGECATEGORY
OTLAPI_ERR_BADTIMEBAL
OTLAPI_ERR_ILLEGALBOOLEAN
OTLAPI_ERR_ILLEGALCURRENCY
OTLAPI_ERR_ILLEGALDATE
OTLAPI_ERR_ILLEGALNAME
OTLAPI_ERR_ILLEGALNUMERIC
OTLAPI_ERR_ILLEGALTAG
OTLAPI_ERR_LEAFLABEL
OTLAPI_ERR_NOSHAREPROTO
OTLAPI_ERR_NOTIMEDIM
OTLAPI_ERR_SHARENOTLEVEL0

Notes

Example

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

ESS_STS_T          sts = 0;
ESS_HOUTLINE_T     hOutline;
ESS_HMEMBER_T      hMemberJan;
ESS_MBRINFO_T      MbrInfo;
ESS_PMBRINFO_T     pMbrInfo = ESS_NULL;
ESS_OBJDEF_T       Object;
ESS_APPNAME_T      szAppName;
ESS_DBNAME_T       szDbName;
ESS_OBJNAME_T      szFileName;

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

sts = EssOtlOpenOutline(hCtx, &Object, ESS_TRUE,
     ESS_TRUE, &hOutline);

if (!sts)
{
   sts = EssOtlFindMember(hOutline, "Jan",
         &hMemberJan);
}

if (!sts && hMemberJan)
{
   sts = EssOtlGetMemberInfo(hOutline,
         hMemberJan, &pMbrInfo);
}

if (!sts && pMbrInfo)
{
   pMbrInfo->usConsolidation = ESS_UCALC_SUB;
   pMbrInfo->fTwoPass = ESS_TRUE;
   pMbrInfo->fExpense = ESS_TRUE;
   sts = EssOtlSetMemberInfo(hOutline,
         hMemberJan, pMbrInfo);
}

if (pMbrInfo)
{
   EssOtlFreeStructure(hOutline, count, structId, structPtr);
}

See Also

EssGetMemberInfo()
EssOtlFindMember()