ChartLogic2

Calculates an entity’s data across a range of periods for the specified Scenario, Year, and Value dimension members.

Syntax

<HsvCalculate>.ChartLogic2 lScenario, lYear, lStartPeriod, lEndPeriod, lEntity, lParent, lValue, varbForceChartLogic

Argument

Description

lScenario

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

lYear

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

lStartPeriod

Long (ByVal). The member ID of the first Period dimension member in the range of periods to be calculated.

lEndPeriod

Long (ByVal). The member ID of the last Period dimension member in the range of periods to be calculated.

lEntity

Long (ByVal). The member ID of the Entity dimension member for which the calculation is to be run.

lParent

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

lValue

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

varbForceChartLogic

Boolean (ByVal). Specifies whether the calculation should be forced if the entity does not require calculation. Specify TRUE to force the calculation, otherwise FALSE.

Example

This example runs a calculation for the dimension members passed to the user-defined GetMemberID function, which returns their member IDs. (For information on GetMemberID, see the example for GetItemID.) These member IDs are then passed to ChartLogic2.

Dim lScen As Long, lYear As Long, lStartPer As Long
Dim lEndPer As Long, lEnt As Long, lPar As Long, lVal As Long
Dim cCalculate As HsvCalculate
lScen = GetMemberID(DIMENSIONSCENARIO, "Actual")
lYear = GetMemberID(DIMENSIONYEAR, "2000")
lStartPer = GetMemberID(DIMENSIONPERIOD, "July")
lEndPer = GetMemberID(DIMENSIONPERIOD, "September")
lEnt = GetMemberID(DIMENSIONENTITY, "Connecticut")
lPar = GetMemberID(DIMENSIONENTITY, "UnitedStates")
lVal = GetMemberID(DIMENSIONVALUE, "USD")
Set cCalculate = m_cHsvSession.Calculate
cCalculate.ChartLogic2 lScen, lYear, lStartPer, lEndPer, _ 
lEnt, lPar, lVal, True