Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Combine specific groups to one group name Post Reply Post New Topic
Author Message
techie3
Newbie
Newbie


Joined: 11 Jan 2007
Location: United States
Online Status: Offline
Posts: 18
Quote techie3 Replybullet 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 IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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 IP Logged
techie3
Newbie
Newbie


Joined: 11 Jan 2007
Location: United States
Online Status: Offline
Posts: 18
Quote techie3 Replybullet 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  
    medical detail line1
    medical detail line2
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 IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet 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 IP Logged
techie3
Newbie
Newbie


Joined: 11 Jan 2007
Location: United States
Online Status: Offline
Posts: 18
Quote techie3 Replybullet 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 IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet 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 IP Logged
techie3
Newbie
Newbie


Joined: 11 Jan 2007
Location: United States
Online Status: Offline
Posts: 18
Quote techie3 Replybullet Posted: 05 Mar 2007 at 3:05pm

Finally got it.  I played around and this is what I have:

  1. Used a formula field called @Grpheader and pasted the above if else if ... statement.
  2. 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 IP Logged
raj4uachiever
Newbie
Newbie


Joined: 30 May 2011
Location: India
Online Status: Offline
Posts: 1
Quote raj4uachiever Replybullet 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 IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.