Generates a currency outline based on the existing outline.
Syntax
ESS_FUNC_M EssOtlGenerateCurrencyOutline (hOutline, phCurOutline);
Parameter | Data Type | Description |
---|---|---|
hOutline | ESS_HOUTLINE_T | Outline context handle. |
phCurOutline | ESS_PHOUTLINE_T | Pointer to an outline context handle for the return of the currency outline. |
Notes
The source outline must have a Time, Accounts, and Country dimension.
Time dimension and all descendants are copied directly from the source outline to a Time dimension in the new outline.
A dimension named CurCategory (Dense, Category = Accounts) is created in the new outline. All currency categories in the source Accounts dimension become children of the CurCategory dimension in the new outline.
A dimension named CurName (Dense, Category = Country) is created in the new outline. All currency names from the source Country dimension become children of the CurName dimension in the new outline.
A dimension named CurType (Sparse, Category = Type) is created with no children in the new outline.
The currency outline must be saved by calling EssOtlWriteOutline() followed by EssOtlRestructure() and closed by calling EssOtlCloseOutline().
The new outline has the following attributes:
Auto-configure is set to ESS_TRUE
Case-sensitivity is the same as the original outline
Return Value
Returns 0 if successful; otherwise one of the following:
OTLAPI_ERR_ALREADYCURRENCY
OTLAPI_CUR_NOACCOUNTS
OTLAPI_CUR_NOTIME
OTLAPI_CUR_NOCOUNTRY
Example
#include <essapi.h> #include <essotl.h> ESS_STS_T sts = 0; ESS_OBJDEF_T Object; ESS_HOUTLINE_T hOutline; ESS_HOUTLINE_T hCurOutline; 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, "Interntl"); strcpy(szFileName, "Interntl"); Object.AppName = szAppName; Object.DbName = szDbName; Object.FileName = szFileName; sts = EssOtlOpenOutline(hCtx, &Object, ESS_TRUE, ESS_TRUE, &hOutline); if (!sts) { sts = EssOtlGenerateCurrencyOutline(hOutline, &hCurOutline); }
See Also