EssGSetGridOption

Description

EssGSetGridOption() sets individual grid options.

Syntax

ESSG_FUNC_M EssGSetGridOption (hGrid, sOption, pOption);
ESSG_HGRID_T hGrid
ESSG_SHORT_T sOption
ESSG_PVOID_T pOption

Parameters

hGridHandle passed back from EssGNewGrid().
sOptionValue indicating what option is being set. The following table lists valid options and the corresponding description and data type:
Value Description Data type expectedDefault
ESSG_OP_ALIASNAMES Alias names ESSG_BOOL_TESSG_FALSE
ESSG_OP_ALIASTABLE Alias names table ESSG_STR_T
ESSG_OP_DATALESS Enable dataless navigation. ESSG_BOOL_TESSG_FALSE
ESSG_OP_DRILLLEVEL Drill-level ESSG_SHORT_TESSG_NEXTLEVEL
ESSG_OP_DRILLONLEAF Performance optimization for queries which drill on leaf members ESSG_BOOL_TESSG_TRUE
ESSG_OP_EMPTYGRIDERROR If FALSE, don't issue error on queries which result in no data and return only the grid header. ESSG_BOOL_TESSG_TRUE
ESSG_OP_INCSEL Include selection ESSG_BOOL_TESSG_FALSE
ESSG_OP_INDENT Indent style ESSG_SHORT_TESSG_INDENTTOTALS
ESSG_OP_LATEST Turn on the ability to specify the latest member. ESSG_BOOL_TESSG_FALSE
ESSG_OP_LATESTMEMBER Specify the latest member. ESSG_STR_TNULL
ESSG_OP_REPEATMBRNAMES Repeat member names. ESSG_BOOL_TESSG_FALSE
ESSG_OP_RETAINTHREAD If set to TRUE, don't disconnect from server thread at end of grid operation. May improve performance when submitting several operations in sequence. ESSG_BOOL_TESSG_FALSE
ESSG_OP_SELGROUP Within selected group ESSG_BOOL_TESSG_FALSE
ESSG_OP_SELONLY Selection only ESSG_BOOL_TESSG_FALSE
ESSG_OP_SUPMISSING Suppress missing rows. ESSG_BOOL_TESSG_FALSE
ESSG_OP_SUPUNDER Replace underscores with spaces. ESSG_BOOL_TESSG_FALSE
ESSG_OP_SUPZEROS Suppress zero rows. ESSG_BOOL_TESSG_FALSE
ESSG_OP_UPDATEMODE Update mode ESSG_BOOL_TESSG_FALSE
ESSG_OP_USEBOTHFORROWDIMS Use both member names and aliases for the row dimensions. ESSG_BOOL_TESSG_FALSE
ESSG_OP_USERGRIDDATA Pointer to user data ESSG_PVOID_TNULL
ESSG_OP_RETAINTHREAD Retain threads ESSG_BOOL_T ESSG_FALSE
ESSG_OP_EMPTYGRIDERROR Issue an empty grid error ESSG_BOOL_T ESSG_FALSE
ESSG_OP_DRILLONLEAF drill to level zero ESSG_BOOL_T ESSG_FALSE
ESSG_OP_DATALESS Navigate without data ESSG_BOOL_T ESSG_FALSE
ESSG_OP_SPANHYBRIDANALYSIS Span drill to relational source ESSG_BOOL_T ESSG_FALSE
pOptionValue of option being set cast to an ESSG_PVOID_T.

Return Value

If successful, returns ESSG_STS_NOERR.

Notes

Example


ESSG_VOID_T ESSG_SetGridOption (ESSG_HGRID_T hGrid)



{

  ESSG_STS_T     sts = ESS_STS_NOERR;

  ESSG_SHORT_T         sOption;

  ESSG_SHORT_T         tmpShort;

  ESSG_PVOID_T         pOption;

   

  /* connect the grid to a database on the server */

  sts = EssGConnect(hGrid, "Rainbow", "Admin", "Password", "Demo", "Basic",

                   ESSG_CONNECT_DEFAULT);



  tmpShort = 2;

  sOption = ESSG_OP_DRILLLEVEL;

  pOption = (ESSG_PVOID_T)tmpShort;



  /* set grid option */

  if(!sts)

     sts = EssGSetGridOption(hGrid, sOption, pOption);

   

  if(!sts)

     EssGDisconnect(hGrid, 0);

}

See Also

Using the Grid API Functions
Grid API Structures