I don't see any error, maybe just my explanation is confusing, sorry.
user selects level from dropdown menu with values 1-3. for example he chooses level 2:
output will be:
acct father
1111 1000
2222 2000
1234 1000
if user chooses different level (2), report grouping should change as:
acct father
1111 1100
2222 2200
1234 1200
problem is in account table, for each account there is only stored direct parent.
algorithm looks like this:
next_parent, level = SELECT father, level FROM ACCT WHERE account = {account from report}
while level != {users selection}
do
next_parent, level = SELECT father, level FROM ACCT WHERE account = next_parent
end while
I just have no idea how to do it in crystal reports