Translate2

Translates an entity’s data from one currency to another across a range of periods for the specified Scenario, Year, and Value dimension members.

Tip:

Translate2 uses the default exchange rates defined for an application. If an application has a translation rule, Translate2 executes the rule instead of applying the default exchange rates.

Syntax

<HsvCalculate>.Translate2 lScenario, lYear, lStartPeriod, lEndPeriod, lEntity, lParent, lValue, varbForceTranslate

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 translated.

lEndPeriod

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

lEntity

Long (ByVal). The member ID of the Entity dimension member for which the consolidation 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 for the currency into which the amount is to be translated.

varbForceTranslate

Boolean (ByVal). Determines whether translations will be forced. Specify TRUE to force translations, otherwise FALSE.

Tip:

Specifying TRUE is analogous to Financial Management’s Force Translate command

Example

This example translates the Italy entity’s amount to the USD currency. The dimension members’ labels are 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 Translate2.

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, "Italy")
lPar = GetMemberID(DIMENSIONENTITY, "Europe")
lVal = GetMemberID(DIMENSIONVALUE, "USD")
Set cCalculate = m_cHsvSession.Calculate
cCalculate.Translate2 lScen, lYear, lStartPer, lEndPer, lEnt, _ 
lPar, lVal, False