Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Group by Post Reply Post New Topic
Author Message
petronas
Newbie
Newbie


Joined: 10 Nov 2008
Online Status: Offline
Posts: 6
Quote petronas Replybullet Topic: Group by
     Posted: 10 Nov 2008 at 6:46pm
Hi,
 
I am very new to Crystal reports, so please excuse if this question is simple.
I have a report which I need to group by email address. The query pulls data based on (email_address like '%@abc.com' or '%@xyz.com')
The report needs to look like:
@abc.com
Rec#1
Rec#2
Rec#3
@xyz.com
Rec#1
Rec#2
Rec#3
I have created two formulas
{Command.email_address}= '%@abc.com'
{Command.email_address}= '%@xyz.com'
 
How do I proceed from here.
 
Thanks,
Petronas
 
 
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 11 Nov 2008 at 6:24am
It would seem that a better formula would be something like mid(email_address, instr(email_address, "@")).  this would give all of the records broken up by their domain.  This be in the formula section of the report.  Then create a group and in the grouping criteria find the formula's name.  All of your records are now grouped as desired.
 
(Thanks to Brian...it is in his book...)
Good Luck 
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