cancel
Showing results for 
Search instead for 
Did you mean: 

break up a hierarchy

Uli_Stoeckl
Participant
0 Kudos

Hi,

I have to break up a hierarchy (costcenter) to fulfill a report-requirement. Our system is Crystal Reports for Enterprise and my DataSoure is a BEx Query.

As default I get the hierarchy in this way from the Query:

L1                                                                                                                                                

        L2A                                                                                                                                      

                  L3A                                                                                                                        

                             CCT_AA 

                  L3B                                                                                                                            

                             CCT_BB 

        L2B                                                                                                                                      

                  L3C                                                                                                                         

                             CCT_CC 

                             CCT_DD 

Till this point everything is fine. Now, the requirement gives the following report-design per row:

1. Level                   2. Level                  3. Level                  CostCenter

L1                            L2A                         L3A                         CCT_AA

L1                            L2A                         L3B                         CCT_BB

L1                            L2B                         L3C                         CCT_CC

L1                            L2B                         L3C                         CCT_DD

Therefore I have to break up the costcenter-hierarchy to show the parent-nodes per costcenter and row. Does anybody has an Idea to get this aim?

Thanks

Uli

Accepted Solutions (0)

Answers (2)

Answers (2)

JWiseman
Active Contributor
0 Kudos

hi Ulrich,

if you're using a classical type hierarchy where you've got 1 field that dictates the group node (e.g. employee) and one field that dictates the parent node (e.g. supervisor) then you need to use the hierarchylevel function in conjunction with the grouping level function and then write out string running totals based on what those values are.

have a look at the attached report...there's no instructions on the report but the report works by noting the above mentioned two values and then creating a string running total for each hierarchy level. in this case i've only done the first 2 levels, so you'll need to create an extra set of formulae.

to open the report, extract the attachment and change the .txt extension to .rpt.

also, if you need to actually use a hierarchy in cross-tabs or charts, please see my blog post here.

i hope this helps,

jamie

former_member205840
Active Contributor
0 Kudos

Hi

Insert a group on Level1, suppress details and place rest of the fields (level2,3 and CostCenter) on group header.

-Sastry

abhilash_kumar
Active Contributor
0 Kudos

In addition to what Sastry Suggests above, you would also need to check the 'Suppress if Duplicated' option for the Group Fields.

-Abhilash