OH SO CLOSE! Sort of...
My hierarchically grouped report is CLOSE but not quite.
While I can get the sort generally correct based on the OID/Parent_OID relationship, my problem is that a Parent can have more than 1 child. To properly order them, I have another field that acts as a sequencer. The sequencer, for all practical purposes starts at 100 (100.000000000000000) with the first record in the table and grows from there. The reason for the precision is to allow later insertions.
So my data looks something like:
OID TITLE SEQ# PARENT_OID
1000 X 100.0
1001 Y 200.0 1000
1002 Z 300.0 1001
1003 A 400.0 1002
1004 B 500.0 1002
1005 C 400.1 1002
1006 D 600.0 1000
1007 E 700.0
1008 F 600.1 1006
...
So one can see the general order that the OID/Parent_OID creates which, as I said, is "generally" correct. But within the group, I need a secondary sort. The problem is, it is not sorting. What I end up with in my result is:
X
Y
Z
A
B
C
instead of
X
Y
Z
A
C
B
which is the correct representation.
My hierarchically grouped report is CLOSE but not quite.
While I can get the sort generally correct based on the OID/Parent_OID relationship, my problem is that a Parent can have more than 1 child. To properly order them, I have another field that acts as a sequencer. The sequencer, for all practical purposes starts at 100 (100.000000000000000) with the first record in the table and grows from there. The reason for the precision is to allow later insertions.
So my data looks something like:
OID TITLE SEQ# PARENT_OID
1000 X 100.0
1001 Y 200.0 1000
1002 Z 300.0 1001
1003 A 400.0 1002
1004 B 500.0 1002
1005 C 400.1 1002
1006 D 600.0 1000
1007 E 700.0
1008 F 600.1 1006
...
So one can see the general order that the OID/Parent_OID creates which, as I said, is "generally" correct. But within the group, I need a secondary sort. The problem is, it is not sorting. What I end up with in my result is:
X
Y
Z
A
B
C
instead of
X
Y
Z
A
C
B
which is the correct representation.