Author |
Message |
techie3
Newbie
Joined: 11 Jan 2007
Location: United States
Online Status: Offline
Posts: 18
|
Topic: Combine specific groups to one group name Posted: 01 Mar 2007 at 11:41am |
I have a subreport with groups. Within these different groups; I would like to combine 3 groups into one custom group name and group together. How do I do that?
|
IP Logged |
|
BrianBischof
Admin Group
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
|
Posted: 01 Mar 2007 at 11:57am |
Hmmm.... I would use a formula and concatenate the three fields together. Then only display them within the appropriate groups. If that isn't what you are looking for, then I would create a global variable, and within each group header concatenate the group name onto the global variable. That way you are building the custom group name as the groups get printed.
|
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
|
IP Logged |
|
techie3
Newbie
Joined: 11 Jan 2007
Location: United States
Online Status: Offline
Posts: 18
|
Posted: 02 Mar 2007 at 7:26am |
I should explain more. The category is just one field with these possible values. If I have categories like insurance, medical, food, cable, phone, and electric; and I want to group just the cable, phone, and electric into a group called utilities. In the report the only groups to show should be:
insurance
insurance detail line1
insurance detail line2
medical
food
food detail line1
food detail line2
utilities
cable detail line1
electric detail line2
electric detail line3
electric detail line4
phone detail line1
phone detail line2
phone detail line3
Edited by techie3 - 02 Mar 2007 at 7:40am
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|
Posted: 02 Mar 2007 at 10:28am |
Quick sample formula to use for your group:
If {table.category field} = 'Cable' then 'Utilities'
else if {table.category field} = 'Electric' then 'Utilities'
else if {table.category field} = 'Phone' then 'Utilities'
else {table.category field}
There are other ways of doing this, but this is a quick and dirty example.
-Dell
|
|
IP Logged |
|
techie3
Newbie
Joined: 11 Jan 2007
Location: United States
Online Status: Offline
Posts: 18
|
Posted: 04 Mar 2007 at 3:47pm |
I set my group to suppress if duplicated but it didnt work. How do I solve the issue below?
utilities
cable detail line1 total utilities
utilities
electric detail line2
electric detail line3
electric detail line4 total utilities
utilities
phone detail line1
phone detail line2
phone detail line3 total utilities
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
|
Posted: 05 Mar 2007 at 9:25am |
Are you grouping on the formula or just using it as the text for the group header? You need to change the group to work on the formula and NOT on the category field itself.
-Dell
|
|
IP Logged |
|
techie3
Newbie
Joined: 11 Jan 2007
Location: United States
Online Status: Offline
Posts: 18
|
Posted: 05 Mar 2007 at 3:05pm |
Finally got it. I played around and this is what I have:
- Used a formula field called @Grpheader and pasted the above if else if ... statement.
- Used the same @Grpheader as the Grouping. (Originally I had a field as my grouping. I changed this in the Group Options Dialog.)
Dell, thank you for your help!
|
IP Logged |
|
raj4uachiever
Newbie
Joined: 30 May 2011
Location: India
Online Status: Offline
Posts: 1
|
Posted: 30 May 2011 at 12:50am |
A |
|
|
|
|
|
C |
|
|
|
|
|
X |
|
|
|
|
Y |
|
|
|
D |
|
KL |
|
|
|
AM |
|
|
|
|
BC |
PO |
|
|
E |
|
|
O |
|
|
|
|
C |
|
|
|
|
R |
Like above i want to show result . if any one have any idea let me know. Thanks Rajkumar Gupta
|
IP Logged |
|
|