Returns data for journals; only actual journal amounts are returned.
To return both scaled and actual amounts, use GetReportData2. |
<IHsvJournalsReport>.GetReportData lScenario, lYear, lPeriod, lValue, vararvFilters, varalColumns, varanSortFlags, pvar2DvarData, pvardValues, pvarlStatus
Long (ByVal). The member ID of the Scenario dimension member for the report data. | |
Long (ByVal). The member ID of the Year dimension member for the report data. | |
Long (ByVal). The member ID of the Period dimension member for the report data. | |
Long (ByVal). The member ID of the Value dimension member for the report data. | |
Variant (ByVal). Filters out journals: When filtering journals, each array element corresponds to a type of filter. The available filters and their indexes in this 32-element array are described in Table 66, Journal Report Filter Array Elements. Specify values for only those elements that correspond to the desired filtering criteria; if you do not want to use a filter, leave the corresponding array element empty. | |
Long array (ByVal). Specifies the display columns that the report data will contain. To create this array, use the constants listed in Table 67, Report Column Display Constants. | |
Integer array (ByVal). Specifies the columns on which the report data will be sorted, as well as the sort order. This array has a one-to-one correspondence with the varalColumns argument’s array. To specify these columns, use one of the HFMConstants type library constants listed in Journal Report Sort Option Constants. | |
Variant array. Returns information for the specified columns. This is a multidimensional array, with one dimension for each column specified in the varalColumns argument; in each dimension, there is one element per journal. For details on the values returned in the array elements, see Table 67, Report Column Display Constants. | |
Variant array. Returns the debit and credit amounts for the journals in the report. This array has a one-to-one correspondence with the pvar2DvarData argument’s array, and is returned as a Double subtype. | |
Variant array. Returns an array that indicates whether the connected user has access to the line items. Each array element returns one of the following values: This array has a one-to-one correspondence with the pvar2DvarData argument’s array, and is returned as a Long subtype. |
The following subroutine gets data of Approved and Posted journals that match the specified journal label and are for the specified dimension members. The journal labels and the labels of the journals’ Entity and Account dimension members are printed to Visual Basic’s Immediate window. The report information is sorted by the Label column in ascending order.
Sub printPostApprJnlRpt(lScen As Long, lYear As Long, lPer As Long, _ lVal As Long, sJnlLbl As String) Dim cJournalsReport As IHsvJournalsReport Dim laCols(3) As Long, vaDisplayData, vaFilter(31) Dim iaSortFlags(0) As Integer, vaVals, vaStatus Dim cTreeInfo As IHsvTreeInfo, sMemberLabel As String 'g_cSession is an HsvSession object reference Set cJournalsReport = g_cSession.Journals 'Specify the display columns. laCols(0) = 0 laCols(1) = 14 laCols(2) = 15 laCols(3) = 16 'Specify the filtering criteria vaFilter(0) = sJnlLbl vaFilter(1) = Array(JSF_APPROVED, JSF_POSTED) 'Sort ascending on the Label column iaSortFlags(0) = JOURNALREPORT_SORT_ASCENDING 'Print the report data for the specified journals. cJournalsReport.GetReportData lScen, lYear, lPer, _ lVal, vaFilter, laCols, iaSortFlags, vaDisplayData, _ vaVals, vaStatus For i = LBound(vaDisplayData, 1) To UBound(vaDisplayData, 1) Debug.Print "Label: " & vaDisplayData(i, 0) 'g_cMetadata is an HsvMetadata object reference Set cTreeInfo = g_cMetadata.Entities cTreeInfo.GetLabel vaDisplayData(i, 1), sMemberLabel Debug.Print "Entity: " & sMemberLabel cTreeInfo.GetLabel vaDisplayData(i, 2), sMemberLabel Debug.Print "Parent: " & sMemberLabel Set cTreeInfo = g_cMetadata.Accounts cTreeInfo.GetLabel vaDisplayData(i, 3), sMemberLabel Debug.Print "Account: " & sMemberLabel & vbCrLf Next i End Sub