EssLROAddObject() links reporting objects to a data cell in an Essbase database.
ESS_FUNC_M EssLROAddObject (hCtx, memCount, pMemComb, usOption, pLRODesc);
ESS_HCTX_T | hCtx |
ESS_ULONG_T | memCount |
ESS_PMBRNAME_T | pMemComb |
ESS_USHORT_T | usOption |
ESS_PLRODESC_API_T | pLRODesc |
hCtx | Essbase API context handle. |
memCount | The number of members specified in pMemComb. |
pMemComb | Array of the member names that define the data cell to be linked. |
usOption | Option specifying where to store the object. Use one of these values:
ESS_STORE_OBJECT_API to store an object on the server. ESS_NOSTORE_OBJECT_API to not store the object on a server. |
pLRODesc | Pointer to object's description structure, ESS_LRODESC_API_T. |
If successful, returns ESS_STS_NOERR. Otherwise, returns an error code.
A call to this function requires write privileges (ESS_PRIV_WRITE) to the active database.
ESS_STS_T ESS_LROAddObject (ESS_HCTX_T hCtx, ESS_HINST_T hInst) { ESS_STS_T sts = ESS_STS_NOERR; ESS_PMBRNAME_T pMemComb = NULL; ESS_LRODESC_API_T lroDesc; ESS_USHORT_T usOption = 0; ESS_ULONG_T memCount; memset (&lroDesc, 0 , sizeof(ESS_LRODESC_API_T)); lroDesc.usObjType = 0; /* Creating a cell note */ strcpy(lroDesc.lro.note, "The profit for Colas in the East based on actuals"); usOption = ESS_NOSTORE_OBJECT_API; strcpy(lroDesc.userName, "user1"); memCount = 5; sts = EssAlloc(hInst, memCount*sizeof(ESS_MBRNAME_T), (ESS_PPVOID_T)&pMemComb); if (sts) { printf("could not allocate memory\n"); return sts; } memset(pMemComb, 0, memCount*sizeof(ESS_MBRNAME_T)); strcpy( pMemComb[0], "Profit"); strcpy( pMemComb[1], "East"); strcpy( pMemComb[2], "Actual"); strcpy( pMemComb[3], "Colas"); strcpy( pMemComb[4], "Year"); sts = EssLROAddObject( hCtx, memCount, pMemComb, usOption, &lroDesc); if (sts) { printf( "Could not attach LRO\n"); } EssFree(hInst, pMemComb); return sts; }
LRO Constant and Structure Definitions
EssLROGetObject()
EssLROUpdateObject()
EssLRODeleteObject()