Translates an entity’s data from one currency to another for the specified Scenario, Year, Period, and Value dimension members.
Translate uses the default exchange rates defined for an application. If an application has a translation rule, Translate executes the rule instead of applying the default exchange rates. |
<HsvCalculate>.Translate lScenario, lYear, lPeriod, lEntity, lParent, lValue, varbForceTranslate, bTranslateAll
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 Translate.
Dim lScen As Long, lYear As Long, lPer As Long
Dim lEnt As Long, lPar As Long, lVal As Long
Dim cCalculate As HsvCalculate
lScen = GetMemberID(DIMENSIONSCENARIO, "Actual")
lYear = GetMemberID(DIMENSIONYEAR, "2000")
lPer = GetMemberID(DIMENSIONPERIOD, "July")
lEnt = GetMemberID(DIMENSIONENTITY, "Italy")
lPar = GetMemberID(DIMENSIONENTITY, "Europe")
lVal = GetMemberID(DIMENSIONVALUE, "USD")
Set cCalculate = m_cHsvSession.Calculate
cCalculate.Translate lScen, lYear, lPer, lEnt, lPar, lVal, _
False, False