Gets the calc equation for a specific member in the active database outline.
Syntax
EsbGetMemberCalc (hCtx, MbrName, MbrCalc, szMbrCalc, MbrLastCalc, szMbrLastCalc) ByVal hCtx As Long ByVal MbrName As String ByVal MbrCalc As String ByVal szMbrCalc As Integer ByVal MbrLastCalc As String ByVal szMbrLastCalc As Integer
Parameter | Description |
---|---|
hCtx | VB API context handle. |
MbrName | Member name. |
MbrCalc | Buffer to receive a member calc string. |
szMbrCalc | Size of the buffer to receive a member calc string. |
MbrLastCalc | Buffer to receive a member last calc string. |
szMbrLastCalc | Size of the buffer to receive a member last calc string. |
Notes
The last calc string is the formula used to calculate the member the last time the database was calculated. It might be left from LastCalcStr if a calc script was used to calculate the database.
If Calc/LastCalc string length is greater that the size of the buffer, the string will be truncated.
Return Value
If successful, this function returns the calc string and last calc string in CalcCtr and LastCalcStr.
Access
This function requires the caller to have at least read access (ESB_PRIV_READ) to the database, and to have selected it as their active database using EsbSetActive().
Example
Declare Function EsbGetMemberCalc Lib "ESBAPIN" (ByVal hCtx As Long, ByVal MbrName As String, ByVal Calc As String, ByVal szCalc As Integer, ByVal LastCalc As String, ByVal szLastCalc As Integer) As Long Sub ESB_GetMemberCalc () Dim sts As Long Dim MbrName As String Const szCalc = 256 Dim Calc As String * szCalc Const szLastCalc = 256 Dim LastCalc As String * szLastCalc MbrName = "Year" '**************** ' Get Member Calc '**************** sts = EsbGetMemberCalc (hCtx, MbrName, Calc, szCalc, LastCalc, szLastCalc) End Sub
See Also