Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Personalized group name Post Reply Post New Topic
Author Message
syndrome
Newbie
Newbie


Joined: 24 Sep 2013
Online Status: Offline
Posts: 1
Quote syndrome Replybullet Topic: Personalized group name
     Posted: 24 Sep 2013 at 7:28pm
I have 2 groups that I want to display, that are recognizable by a database field called "session", that is a number. These numbers are sequentially and every time differente (for example 15 and 16, or 2512 and 2513, etc).

Now I want to separate it in 2 groups, but I don't want to show the number but only FIRST for the first group and SECOND for the second group.

How can I do this?
I tryed to set a variable and in the group name control if the variable is 0 write "FIRST" (and then increases the variable) otherwise write "SECOND", but it doesn't work, it write 2 times FIRST or 2 times SECOND (in dependence of the changes I made).
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 25 Sep 2013 at 1:18am
what are the actual numbers? if the numbers are actually like 15 and 2512, you could create a formula like this:

if {table.session} < 2000 //(take a number that suits you)
then 'FIRST' else 'SECOND'

then use that formula to group your report on.
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 25 Sep 2013 at 6:33am
HI

As per my understanding, you have a session field which consist of numbers (even and odd numbers ex: 15,16) so, you want all even number in first group and all odd number in second group right ?

if So, use below formula :

if {Session} Mod 2 = 0 then "FRIST"
Else "SECOND"
Thanks,
Sastry
IP IP Logged
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