GetCalcStatus

Returns the calculation status of a subcube. The subcube is identified by GetCalcStatus’s arguments. (For information on subcubes, see About Subcubes.)

Syntax

<HsvData>.GetCalcStatus lScenario, lYear, lPeriod, lEntity, lParent, lValue, plCalcStatus

Argument

Description

lScenario

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

lYear

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

lPeriod

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

lEntity

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

lParent

Long (ByVal). The member ID of the parent of the lEntity argument's entity.

lValue

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

plCalcStatus

Long. Returns the subcube’s calculation status as a bit-field. The valid statuses that this bit-field can contain are represented by constants in the HFMConstants type library; for a list of constants, see Subcube Period Calculation Status Constants.

Example

The following example tests a subcube’s status to determine whether the subcube contains no data. GetCalcStatus’s returned subcube status is assigned to the lCalcStat variable. The If statement performs a bitwise comparison to see if the subcube’s status includes the calculation status code for no data, which is represented by the CALCSTATUS_NODATA constant. If lStat contains this calculation status, then any code placed within the If structure would be executed. The example assumes that the variables in GetCalcStatus’s member ID arguments were passed from another procedure.

Dim cData As HsvData, lCalcStat As Long
Set cData = m_cHsvSession.Data
cData.GetCalcStatus m_lScen, m_lYear, m_lPer, m_lEnt, m_lPar, _ 
m_lVal, lCalcStat
If (CALCSTATUS_NODATA And lCalcStat) Then
  …
End If