EssGBeginReport() runs a report script at the server.
ESSG_FUNC_M EssGBeginReport (hGrid, pszReportIn, ulOptions)
| ESSG_HGRID_T | hGrid |
| ESSG_STR_T | pszReportIn |
| ESSG_ULONG_T | ulOptions |
| hGrid | Handle passed back from EssGNewGrid. |
| pszReportIn | String (no greater than 64K) containing an Essbase report specification. |
| ulOptions | A bitmask which describes returned grid options. Valid values are: ESSG_NOATTRIBUTES returns grid without pAttributes values. |
If successful, returns ESSG_STS_NOERR.
None.
ESSG_VOID_T ESSG_BeginReport (ESSG_HGRID_T hGrid)
{
ESSG_FUNC_M sts = ESS_STS_NOERR;
ESSG_PPDATA_T ppDataOut;
ESSG_RANGE_T rDataRangeOut;
ESSG_ULONG_T ulOptions;
ESSG_STR_T pszReportIn;
ESSG_USHORT_T usState;
/* connect the grid to a database on the server */
sts = EssGConnect(hGrid, "Rainbow", "Admin", "Password", "Demo", "Basic",
ESSG_CONNECT_DEFAULT);
if(sts == 0)
{
pszReportIn = "{TabDelim}<idesc Year !";
ulOptions = ESSG_NOATTRIBUTES;
sts = EssGBeginReport(hGrid, pszReportIn,
ulOptions);
}
if(sts == 0)
{
/* perform the report */
sts = EssGPerformOperation(hGrid, 0);
}
if(sts == 0)
{
/* determine the results of the report */
sts = EssGGetResults(hGrid, 0, &rDataRangeOut,
&usState);
}
if(sts ==0)
{
/* get all the data */
sts = EssGGetRows(hGrid, 0, &rDataRangeOut,
&rDataRangeOut, &ppDataOut);
}
if(sts == 0)
{
DisplayOutput(ppDataOut, rDataRangeOut);
/* Free the returned data */
EssGFreeRows(hGrid, &rDataRangeOut, ppDataOut);
}
if(!sts)
{
EssGEndOperation(hGrid, 0);
EssGDisconnect(hGrid, 0);
}
}