EssListFilters
Description
EssListFilters() lists all filters for a database.
Syntax
ESS_FUNC_M EssListFilters (hCtx, AppName, DbName, Count, ppFilterList);
ESS_HCTX_T | hCtx |
ESS_STR_T | AppName |
ESS_STR_T | DbName |
ESS_PUSHORT_T | pCount |
ESS_PPFTRNAME_T | ppFilterList |
Parameters
hCtx | Essbase API context handle. |
AppName | Application name. |
DbName | databasename. |
pCount | Address of variable to receive count of filter names.
|
ppFilterList | Address of pointer to receive an allocated array of filter name strings.
|
Return Value
If successful, returns the count of filters in the database in
pCount, and an array of filter names in ppFilterList.
Notes
- The memory allocated for ppFilterList should be freed
using EssFree().
Access
This function requires the caller to have database Design privilege
(ESS_PRIV_DBDESIGN) for the specified database.
Example
ESS_FUNC_M
ESS_ListFilters (ESS_HCTX_T hCtx, ESS_HINST_T hInst)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_STR_T AppName;
ESS_STR_T DbName;
ESS_USHORT_T Count = 0;
ESS_USHORT_T ind;
ESS_PFTRNAME_T pFilterList = NULL;
AppName = "Sample";
DbName = "Basic";
sts = EssListFilters(hCtx, AppName, DbName,
&Count, &pFilterList);
if(!sts)
{
if(Count && pFilterList)
{
printf ("\r\n-------Filter List-------\r\n\r\n");
for (ind = 0; ind < Count; ind++)
printf("%s\r\n",pFilterList[ind]);
EssFree (hInst, pFilterList);
}
else
printf ("\r\nFilter List is empty\r\n\r\n");
}
return (sts);
}
See Also
EssGetFilter()
EssSetFilter()