Adds an application’s cell to an HsvMDDataBuffer or HsvMDDataBufferLite object. Any data, description, or line items for the cell will be added.
<HsvData>.AddDataToMDDataBuffer lScenario, lYear, lPeriod, lView, lEntity, lParent, lValue, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, varbIncludeDerivedData, pIUnkDataBuffer
The following example adds cells to an HsvMDDataBuffer object. The member IDs for all dimension members other than the Account dimension are passed from another procedure. IHsvTreeInfo.EnumAllMemberIDs gets the member IDs of the application’s accounts, and the first For…Next loop uses HsvMetadata.IsCustomMemberValidForAccount to identify the accounts that have valid intersections for the Custom dimension members passed from the other procedure. Cells for the valid intersections are then added to an HsvMDDataBuffer object with AddDataToMDDataBuffer.
Dim cHsvMDBuffer As HsvMDDataBuffer, iMemsCount As Integer Dim vaMemIDs, bCust1Valid As Boolean, bCust2Valid As Boolean Dim bCust3Valid As Boolean, bCust4Valid As Boolean Set cHsvMDBuffer = New HSVMDARRAYSLib.HsvMDDataBuffer 'Get the IDs of all the Account dimension members. m_cIHsvTreeInfo.EnumAllMemberIDs vaMemIDs 'Add the cells for accounts that are valid for the 'custom dimensions to an HsvMDDataBuffer object. For iMemsCount = LBound(vaMemIDs) To UBound(vaMemIDs) m_cHsvMetadata.IsCustomMemberValidForAccount 8, m_lCust1, _ vaMemIDs(iMemsCount), bCust1Valid m_cHsvMetadata.IsCustomMemberValidForAccount 9, m_lCust2, _ vaMemIDs(iMemsCount), bCust2Valid m_cHsvMetadata.IsCustomMemberValidForAccount 10, m_lCust3, _ vaMemIDs(iMemsCount), bCust3Valid m_cHsvMetadata.IsCustomMemberValidForAccount 11, m_lCust4, _ vaMemIDs(iMemsCount), bCust4Valid If bCust1Valid = True And bCust2Valid = True And _ bCust3Valid = True And bCust4Valid = True Then m_cHsvData.AddDataToMDDataBuffer m_lScen, m_lYear, m_lPer, _ m_lView, m_lEnt, m_lPar, m_lVal, _ vaMemIDs(iMemsCount), m_lICP, m_lCust1, m_lCust2, _ m_lCust3, m_lCust4, FALSE, cHsvMDBuffer End If Next iMemsCount