GetCalcStatusStatistics

Returns arrays of flags that indicate which calculation statuses apply to the specified entities and periods of a subcube. For each specified period, GetCalcStatusStatistics returns an array of two-dimensional arrays.

Syntax

<HsvData>.GetCalcStatusStatistics(lScenarioID, lYearID, varalPeriodIDs, lValueID, varalEntityIDs, varalParentIDs, vbOBPActiveOnly)

Argument

Description

lScenarioID

Long (ByVal). The member ID of the subcube's Scenario dimension member.

lYearID

Long (ByVal). The member ID of the subcube's Year dimension member.

varalPeriodIDs

Long array (ByVal). The member IDs of the Period dimension members for which to return status information.

lValueID

Long (ByVal). The member ID of the subcube's Value dimension member.

varalEntityIDs

Long array (ByVal). The member IDs of the Entity dimension members for which to return status information.

varalParentIDs

Long array (ByVal). The member IDs of the parents of the varalEntityIDs argument’s entities.

vbOBPActiveOnly

Boolean (ByVal). Specifies whether to return status information for only active entities. This applies only to organization-by-period applications. Pass TRUE to return information for only active entities.

Return Value

Variant. Returns an array of Long two-dimensional arrays that indicate which calculation statuses apply to any cells that intersect the specified dimension members. Each array of two-dimensional arrays has a one-to-one correspondence with the varalPeriodIDs argument’s array. The two-dimensional arrays contain the following information:

Example

The following subroutine prints to Visual Basic’s Immediate window whether the specified entities contain cells that have calculation statuses of NoData or CN ND.

Sub areEntitiesNDorCNND(lScen As Long, lYear As Long, laPers() As Long, _
  lVal As Long, laEnts() As Long, laPars() As Long)
Dim vRet As Variant, cData As HsvData, cTreeInfo As IHsvTreeInfo
Dim sPeriod As String
'g_cSession is an HsvSession object reference
Set cData = g_cSession.Data
'g_cMetadata is an HsvMetadata object reference
Set cTreeInfo = g_cMetadata.Periods
vRet = cData.GetCalcStatusStatistics(lScen, lYear, laPers, lVal, _
  laEnts, laPars, False)
For i = LBound(vRet) To UBound(vRet)
  cTreeInfo.GetLabel laPers(i), sPeriod
  Debug.Print sPeriod + " period:"
  Debug.Print "   NoData: " + CStr(vRet(i, CALCSTATUS_STATSCOL_NODATA))
  Debug.Print "   CN ND: " + CStr(vRet(i, CALCSTATUS_STATSCOL_CNND))
Next i
End Sub