A user function can be defined for each view in the column D (User function). The definition consists of the function name and parameters, which are separated by semicolon ;.
If the function has been defined for a view, each displayed value in view is a result of its calling. The user function must be defined in a module UserFunkcie and must contain the following parameters:
Private Function UserFunction(ArcBId As Long, Id As Long, NumItems As Long, UserParams As Variant) As Variant |
where:
ArcBId - internal identifier of archive block
Id -
consecutive number of value which will be displayed.
The value of parameter is:
NumItems - size of longer side of view (viewing
area), for which the function has been defined, or -1, in the case of
initialization of function
UserParams - array of user parameters defined in view
definition.
You can accomplish the required calculation or modification of displayed value. Within this function, you can call the following functions:
Getting the value to be displayed by its consecutive number in archive block
Property Get GetActualD2DataObj(Index As Long, ByRef D2DataObj As VBApi_TUniVal) As Long |
Index - consecutive number of value in archive block (parameter Id
in UserFunction)
D2DataObj - value from archive
Return value:
Property Get GetActualD2DataObjItems() As Long |
When an error occurs, the return value is -1.
Property Get GetActualD2DataBT() As Date |
When an error occurs, the return value is D2DataIdNotValid.
Property Get GetD2DataObj(ArchBlockId As Long, Index As Long, ByRef D2DataObj As VBApi_TUniVal) As Long |
ArchBlockId - number of archive block (parameter of user
function)
Index - consecutive
number of value in archive block (parameter Id
in UserFunction)
D2DataObj - value from archive
Return value:
Property Get GetArchBlockId(ArchBlock As String) As Long |
When an error occurs, the return value is ArchBlockNotExist.