Print Page | Close Window

Group header tree structure

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22997
Printed Date: 24 Apr 2024 at 4:58am


Topic: Group header tree structure
Posted By: DDSJ
Subject: Group header tree structure
Date Posted: 17 Feb 2022 at 3:15am
Hi Team,

I have three groups, A, B and C and I am trying to create tree structure of group header like A is parent and B and C are childs of it meaning B and c are grouped bade on fields of A . I want to display A-->B-->C in this manner but not able to do that . Please any one can help?



Replies:
Posted By: lockwelle
Date Posted: 17 Feb 2022 at 11:58am
the structure you are drawing a-->b-->c implies that c is child of b, and b is a child of a.

I don't know if it work as groups tend to cascade, what I would try is to create 2 formulas. 1 formula would be a.field = b.field and the other formula would be a.field2 = c.field2.

I am not sure if it will work...I am actually leaning towards it not working, and it is what I would try...


Oh, here is another idea. It is not a good solution as I try to avoid subreports, and create groups a and b, and then have a subreport for group c. Display it after group b, I would create a second section for Group b, and drop the subreport there. Associate the parameter between the subreport and the main report based on group a values.

That should work.

HTH


Posted By: DDSJ
Date Posted: 17 Feb 2022 at 4:33pm
Hello,

The structure I am drawing is b is child of a and c is also the child of a, and b and c had same field which is equal to field of a . Also I cannot use subreport because this structure I need is already inside subreport only and we cannot use subreport inside subreport. Also how we use formula to create such structure as u mentioned is not clear to me. Please help to clarify and achieve the same .


Posted By: lockwelle
Date Posted: 18 Feb 2022 at 6:31am
Correct, subreports only go down 1 level.

Since b and c link to the same field in A, why not just write the report with a section for B and then a section below for C information.

B and C are in the same Grouping of A.

The formula is false path given that both B and C tie to the same field in A.

The report I am envisioning would look something like this:
Group1a A - all the A information
Group1b B - Since B is tied to A, put its information in its own section
Group1c C - Same for C, tied to A in the same way


HTH



Print Page | Close Window