Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Group by alpha split and sum amounts Post Reply Post New Topic
Author Message
Paula L
Newbie
Newbie
Avatar

Joined: 26 May 2010
Online Status: Offline
Posts: 2
Quote Paula L Replybullet Topic: Group by alpha split and sum amounts
    Posted: 26 May 2010 at 3:47pm
I have created a crystal report that contains 2 columns.  The first column contains last name sorted A to Z the second column contains a dollar amount. One amount for each name.
Anderson  $10.00
Camp        $10.00
Franks       $10.00
Gapp          $10.00
 
Some where on the report I also want to see
A-F   $20.00
G-N   $20.00
 
How do I accomplish this? 
Note: I have only been using Crystal Reports for about 1 month so techy I'm not.
Paula L
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 May 2010 at 4:12am
You can create a formual field to get your sums for different 'groupings'
@AtoF ...
if left({table.namefield},1) in 'A' to 'F' then table.amount else 0
 
@GtoN
if left({table.namefield},1) in 'G' to 'N' then table.amount else 0
IP IP Logged
Paula L
Newbie
Newbie
Avatar

Joined: 26 May 2010
Online Status: Offline
Posts: 2
Quote Paula L Replybullet Posted: 01 Jun 2010 at 12:37pm
I tried the first formula for A to F and it only calculated last name of A...suggestions?
Paula L
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Jun 2010 at 4:09am
Hmmm.
You can use this instead. Was trying to save some typing...
@AtoF ...
if uppercase(left({table.namefield},1)) in ['A','B','C','D','E','F'] then table.amount else 0
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.