Creates a drill-through URL, with the given link and name, within the active database outline.
Syntax
ESS_FUNC_M EssCreateDrillThruURL (hCtx, pUrl);| Parameter | Data Type | Description |
|---|---|---|
hCtx | ESS_HCTX_T | API context handle |
pUrl | ESS_PDURLINFO_T | URL definition |
Return Value
If successful, creates a drill-through URL in the active database outline.
If unsuccessful, returns an error code.
Access
Caller must have database Design privilege (ESS_PRIV_DBDESIGN) for the specified database.
Caller must have selected the specified database as the active database using EssSetActive().
Example
/* Sample Code for EssCreateDrillThruURL */
ESS_STS_T sts = ESS_STS_NOERR;
ESS_DURLINFO_T url;
ESS_USHORT_T usCountOfURLs, i;
ESS_PDURLINFO_T listOfURLs;
ESS_STR_T urlName = "";
ESS_PDURLINFO_T urlInfo;
ESS_STR_T fileName = "";
ESS_CHAR_T xmlString[XML_CHAR_MAX];
/* Valid case */
memset(&url, '\0', sizeof(ESS_DURLINFO_T));
fileName = "F:\\testarea\\mainapi\\sample1.xml";
GetFileContent(fileName, xmlString);
printf("\nValid case:\n");
url.bIsLevel0 = ESS_TRUE;
url.cpURLName = "Drill Through to EPMI";
url.cpURLXml = xmlString;
url.iURLXmlSize = (ESS_SHORT_T) strlen(xmlString)+1;
url.iCountOfDrillRegions = 2;
sts = EssAlloc (hInst, sizeof(ESS_STR_T) * url.iCountOfDrillRegions, &(url.cppDrillRegions));
url.cppDrillRegions[0] = "@idesc(\"Qtr1\")";
url.cppDrillRegions[1] = "@idesc(\"Qtr2\")";
sts = EssCreateDrillThruURL(hCtx, &url);
printf("EssCreateDrillThruURL sts: %ld\n",sts);