Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Calculating Percentages in Summaries Post Reply Post New Topic
Author Message
theotherdodge
Groupie
Groupie


Joined: 17 Nov 2008
Online Status: Offline
Posts: 40
Quote theotherdodge Replybullet Topic: Calculating Percentages in Summaries
     Posted: 01 Dec 2009 at 2:52pm
I have a report that needs to shows  Company number, Customer name, revenues, costs, margin$ and margin% for a specific month range (as input by the user as a parameter).
 
The data has  Company Number, Customer name, revenues, costs, month.
 
The report is grouped by Company, then by Customer name.  I have the totals summarized in the Customer name group footer to get me total revenues, total costs (grouped by the Month range).
 
How do I get a margin$ and margin% because they would be calculated based on the totals (total revenues, total costs) for each Customer?
 
I supress the detail and only show the group summary and the report would look like this (remember, I am able to calc the Revenues and Costs but not the Revenue$ and Revenue%):
 
Customer Name     Revenues     Costs     Revenue$     Revenue%
Exxon                      123,252      58,989      64,263           52.06%
BP                            500,000     100,000   400,000           80.00%
 
Thanks! 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Dec 2009 at 3:19pm
Create 2 different formula fields to do this (one per summary) and place them on group footer for the customer name level:
SUM(revenue field,customer)-SUM(costfield,customerfield)
 
(SUM(revenue field,customer)-SUM(costfield,customerfield)) % SUM(reveneue field,customer)


Edited by DBlank - 01 Dec 2009 at 3:20pm
IP IP Logged
theotherdodge
Groupie
Groupie


Joined: 17 Nov 2008
Online Status: Offline
Posts: 40
Quote theotherdodge Replybullet Posted: 02 Dec 2009 at 5:00am
Thanks DBlank, works like a champ!
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