| Author |
Message |
sophieTaureau
Newbie
Joined: 26 Jan 2012
Online Status: Offline
Posts: 17
|

Topic: If the group is existed Posted: 23 Feb 2012 at 4:23am |
Hi
in CR I have created 3 groups, "group1", "group2","group3" I would like display group1 if "group1" is existed
if "group1"is not existed-> display "group2" How can I DO that, please?
|
IP Logged |
|
|
|
rkrowland
Senior Member
Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
|

Posted: 23 Feb 2012 at 4:44am |
I don't follow, in all instances where there's a group 2 and/or 3 a group 1 must already exist above them.
Please clarify what exactly it is you want.
Regards,
Ryan.
|
IP Logged |
|
kostya1122
Senior Member
Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
|

Posted: 23 Feb 2012 at 5:33am |
|
go to section expert select group 2 header click the X-2 button next to suppress (no drill-down)
place a formula like
not(isnull(table.group1_field))
then select group 3 header click the X-2 button next to suppress (no drill-down)
place a formula like
not(isnull(table.group1_field)) or
not(isnull(table.group2_field))
Edited by kostya1122 - 23 Feb 2012 at 5:35am
|
IP Logged |
|
sophieTaureau
Newbie
Joined: 26 Jan 2012
Online Status: Offline
Posts: 17
|

Posted: 23 Feb 2012 at 9:42pm |
Hi, I will clarify my question, the table is like that:
Departement employeeName Fonction
sale ABD Director
sale ABA Vice Director
production CCD Vice Director
production CPP worker
The resultat I want is display the Director's name, if in this departement, there are not director, so display the vice director's name, like that:
Departement employeeName
sale ABD
production CCD
|
IP Logged |
|
rkrowland
Senior Member
Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
|

Posted: 23 Feb 2012 at 10:18pm |
This is how I'd try and do it, however I haven't tested it so can't guarantee it would work.
First create a group on Department and then another group on Function.
Now, create a formula, for example's sake we'll call it role;
@Role
if {table.function} = "Director" then 1 else
if {table.function = "Vice Director" then 2 else
100
Now here's the part I'm not sure Crystal will allow you to do. Go to Report > Selection Formulas > Group... and enter the following.
Let me know how it goes.
Regards,
Ryan.
|
IP Logged |
|
sophieTaureau
Newbie
Joined: 26 Jan 2012
Online Status: Offline
Posts: 17
|

Posted: 24 Feb 2012 at 3:13am |
rkrowland,
I know you idea, I have tried your solution,
once I created the group 'fonction'and 'Role' and entered the formula
Selection Formulas, there are no data displayed in the détail.
I have no idea... 
|
IP Logged |
|
rkrowland
Senior Member
Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
|

Posted: 24 Feb 2012 at 3:24am |
Try this in the group selection formula instead;
Is it possible to have more than 1 director or vice director in any given department?
Regards,
Ryan.
|
IP Logged |
|
sophieTaureau
Newbie
Joined: 26 Jan 2012
Online Status: Offline
Posts: 17
|

Posted: 24 Feb 2012 at 3:59am |
rkrowland, I tried your proposal, I just made a little change like that:
THanks very very much!!!  Edited by sophieTaureau - 28 Feb 2012 at 2:36am
|
IP Logged |
|
|
|