This content has been marked as final. Show 3 replies
Not sure if this solves your problem or not, but if you select the entire grid and go to the "position" tab on the grid properties you can select where you want the members to appear on expansion, either before or after parent.
Thank you for your response. Unfortunately, this feature doesn't take effect unless I turn on the "allow expansion" check box for a line item. Since i had built in parents as a part of my member list, I didn't originally check that box. After your suggestion, I checked the "allow expansion" box and changed the position settings to see if it would reorder the elements, and this didn't work.
Here is one possible solution that I came up with for my question. The following code creates a member list that will add the accounts in the correct order with parents showing up at the bottom of each hierarchy. The code below is for the balance sheet set of accounts, but can be used on other hierarchies as well.
acc = HS.Account.List("BALANCE_SHEET","[Descendants]")
Set Array1 = CreateObject ("System.Collections.ArrayList")
Set Array2 = CreateObject ("System.Collections.ArrayList")
' Assigning list to an array
For Each a1 in acc
UD2Var = HS.Account.UD2(a1)
If UD2Var = "TB_Acct"
y = Array1.Count-1
' Input all members that are reported trial balance lines into the MemberList in correct order
TargetAcct = Array1(i)
For j = i to y
If Array1(i) = Array1(j) Then
If HS.Account.IsDescendant(TargetAcct, Array1(j)) Then
TargetAcct = Array1(j)
Array1.Remove(TargetAcct) ' Remove the account that was added to the new list from the original list
y = y-1
Loop While (y>0)
For each a1 in Array2
Once this member list was in place, I used FR studio to conditionally format the rows I needed indented. I would welcome any suggestions on how to code this better.
Edited by: MR on Jan 31, 2013 2:57 PM