EssGetFilter
Description
EssGetFilter() starts getting the contents of a filter.
Syntax
ESS_FUNC_M EssGetFilter (hCtx, AppName, DbName, FilterName, pActive, pAccess);
ESS_HCTX_T | hCtx |
ESS_STR_T | AppName |
ESS_STR_T | DbName |
ESS_STR_T | FilterName |
ESS_PBOOL_T | pActive |
ESS_PACCESS_T | pAccess |
Parameters
hCtx | Essbase API context handle. |
AppName | Application name. |
DbName | Database name. |
FilterName | Filter name. |
pActive | Address of variable to receive filter active flag. If TRUE, the filter is currently in effect for the specified database.
|
pAccess | Address of variable to receive the default filter access level. For possible values, see Bitmask Data Types.
|
Return
Value
If successful, returns the filter active flag in pActive,
and the default filter access level in pAccess.
Notes
- This call must be followed by successive calls to EssGetFilterRow()
to fetch the rows for the filter.
Access
This function requires the caller to have database Design privilege
(ESS_PRIV_DBDESIGN) for the specified database.
Example
ESS_FUNC_M
ESS_GetFilter (ESS_HCTX_T hCtx, ESS_HINST_T hInst)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_STR_T AppName;
ESS_STR_T DbName;
ESS_STR_T FilterName;
ESS_BOOL_T Active;
ESS_ACCESS_T Access;
ESS_STR_T RowString = NULL;
ESS_STR_T Acc_Str;
AppName = "Sample";
DbName = "Basic";
FilterName = "Test";
/**************
* Get Filter *
**************/
sts = EssGetFilter(hCtx, AppName, DbName,
FilterName, &Active, &Access);
/*******************
* Get Filter Rows *
*******************/
if(!sts)
{
sts = EssGetFilterRow(hCtx, &RowString,
&Access);
if(!sts && RowString)
{
printf("%s Filter Rows\r\n",FilterName);
while(RowString)
{
switch (Access)
{
case ESS_ACCESS_NONE:
Acc_Str = "NONE";
break;
case ESS_ACCESS_READ:
Acc_Str = "READ";
break;
default:
Acc_Str = "WRITE";
break;
}
printf("%s - %s\r\n",Acc_Str,RowString);
sts = EssGetFilterRow(hCtx, &RowString,
&Access);
}
EssFree(hInst, RowString);
}
}
return (sts);
}
See
Also
EssGetFilterRow()
EssListFilters()
EssSetFilter()