Deletes a dimension from the outline. The call also specifies a member of the dimension being deleted from which to keep data when the outline is restructured.
Syntax
ESS_FUNC_M EssOtlDeleteDimension (hOutline, hMember, pszDataMbr);
Parameter | Data Type | Description |
---|---|---|
hOutline | ESS_HOUTLINE_T | Outline context handle. |
hMember | ESS_HMEMBER_T | Handle of member to delete. |
pszDataMbr | ESS_STR_T | Member name in the dimension to be deleted from which data will be saved when the outline is restructured. If this field is ESS_NULL, the dimension is used. |
Notes
All shared members of the dimension and its descendants are deleted.
All members of the dimension are deleted.
To delete a dimension, you can use this call or EssOtlDeleteMember(). EssOtlDeleteDimension() gives you the benefit of selecting a member of the deleted dimension whose data values will be used as the data values for the other dimensions when the database is restructured. If EssOtlDeleteMember() is used, the data values of the top member (dimension) of the deleted dimension are used.
In order for the pszDataMbr field to take effect, the outline must have been opened with EssOtlOpenOutline() with the fKeepTrans flag set to ESS_TRUE.
Return Value
Returns 0 if successful; otherwise:
OTLAPI_ERR_ADDDELETEDIMDYNAMICCALC OTLAPI_ERR_NOTIMEDIM
Example
#include <essapi.h> #include <essotl.h> ESS_STS_T sts = 0; ESS_OBJDEF_T Object; ESS_HOUTLINE_T hOutline; ESS_HMEMBER_T hMemberScenario; 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, "Scenario", &hMemberScenario); } if (!sts && hMemberScenario) { sts = EssOtlDeleteDimension(hOutline, hMemberScenario, "Actual"); }
See Also