EssOtlQueryGenerationInfo() queries for the time dimension generation information contained in the comment field for the dimension's top member. Once this information is known, it can be used with EssOtlGetLinkedAttributeAttachLevel() to provide period over period analysis.
Syntax
ESS_FUNC_M EssOtlQueryGenerationInfo (hOutline, szName, queryID, ppReturns);
Parameter | Data Type | Description |
---|---|---|
hOutline | ESS_HOUTLINE_T | Outline handle. This must have been returned from EssOtlOpenOutlineQuery(). |
szName | ESS_STS_T | Name of the top member of the date-time dimension |
queryID | ESS_ULONG_T | Use the query identifier constant ESS_OTLQRYTIDIM_TIMEPERIODS |
ppReturns | ESS_PPVOID_T | A pointer to the query information structure for this dimension. |
Notes
The caller of EssOtlQueryGenerationInfo() should call EssOtlFreeStructure() with structure ID ESS_DT_STRUCT_TIGENINFO to free the memory set aside for the returned structure pointer.
Return Value
If successful, returns a pointer to a ESS_PTIMEDIM_GENINFO_T structure.
Example
SS_STR_T strBuf1 = "Year"; ESS_ULONG_T queryId = ESS_OTLQRYTIDIM_TIMEPERIODS; ESS_PVOID_T pReturns; ESS_PTIMEDIM_GENINFO_T tpStruc = NULL; sts = EssOtlQueryGenerationInfo (hOutline, /*query outline handle*/ strBuf1, /* IN - date-time dimension member name*/ queryId, /* IN - query ID */ &pReturns); if (sts) goto exit; switch (queryId) { case ESS_OTLQRYTIDIM_TIMEPERIODS: tpStruc = (ESS_PTIMEDIM_GENINFO_T)pReturns; for (ii = 0; ii < tpStruc->usCount; ii++) fprintf(cmdctxp->output, "Time period for Gen %d = %s\n", ii+1, TimePeriodNames[tpStruc->ptps[ii]]); sts = EssOtlFreeStructure (cmdctxp->hOutline[hOutlineChoice], ESS_DT_STRUCT_TIGENINFO, 1, pReturns); if (sts) goto exit; break; default: break; }
See Also