Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Change the Group Name Field Post Reply Post New Topic
Author Message
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Topic: Change the Group Name Field
    Posted: 02 Nov 2011 at 11:35am
Hello,
 
Please help.  I have 3 group names.
  1. Primary
  2. Spouse
  3. Family Member

These are Group Name Fields.  How do I create a formula to change Primary to Employee?

Thank you.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 02 Nov 2011 at 4:01pm

Try something like this:

If {table.groupfield} = 'Primary' then 'Employee' else {table.groupfield}
 
-Dell
IP IP Logged
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Posted: 03 Nov 2011 at 3:30am
Thank you, but I keep getting a message stating that a boolean is required here.  Please see my formula below:
 
{S_ORG_EXT.PAR_OU_ID} = "1-9FCGA" and
if {S_CONTACT_X.ATTRIB_42} = 'Primary' then 'Employee'
else {S_CONTACT_X.ATTRIB_42}
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Nov 2011 at 3:56am
move your if up in the statement
if {S_ORG_EXT.PAR_OU_ID} = "1-9FCGA" and
{S_CONTACT_X.ATTRIB_42} = 'Primary' then 'Employee'
else {S_CONTACT_X.ATTRIB_42}
IP IP Logged
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Posted: 03 Nov 2011 at 4:22am
Sorry.  I'm still getting the boolean error. 
 
Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Nov 2011 at 4:46am
Are you putting this in the select expert or in the Field Explorer > Formula Fields ? or somewhere else?

Edited by DBlank - 03 Nov 2011 at 4:47am
IP IP Logged
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Posted: 03 Nov 2011 at 4:59am
Hello,
 
I'm putting this in the select expert, although I think I'm handling this in the wrong way. 
 
Here's the situation.  I have a Group in the Group Footer called s_contact_x.attrib_42 A in ascending order.  There are 3 groups in this group:
 
1.  Family
2.  Spouse
3.  Primary
 
I need to change all of the Primary's listed in the report to "Employee".  I also need to sort this in the following order:
 
1.  Employee
2.  Spouse
3.  Family.
 
I know how to do the sort order, but I can't seem to change Primary to Spouse.  Any ideas?
 
Thank you in advance.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Nov 2011 at 5:07am
the select expert is used only to filter data.
 
I am not sure what you mean by a 'group' in a group footer.
If you are grouping on the a field (s_contact_x.attrib_42 A) that has 3 values in it use the
field explorer,
formula field,
right click and select NEW
name it whatever you want (something like 'name_with_employee')
add the formula that hilfy suggested
if {s_contact_x.attrib_42 A}='primary' then 'Employee' else {s_contact_x.attrib_42 A}
Niow use the formula field to group on instead of your original field.


Edited by DBlank - 03 Nov 2011 at 5:08am
IP IP Logged
dawnh44
Groupie
Groupie


Joined: 25 Sep 2011
Online Status: Offline
Posts: 79
Quote dawnh44 Replybullet Posted: 03 Nov 2011 at 3:21pm
Hello,
 
Thank you, thank you, thank you so much.  I really appreciate your help.
 
Dawn
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.016 seconds.