Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formulas in report header Post Reply Post New Topic
Author Message
db3712
Groupie
Groupie
Avatar

Joined: 30 Oct 2008
Location: United States
Online Status: Offline
Posts: 44
Quote db3712 Replybullet Topic: Formulas in report header
     Posted: 22 Jan 2013 at 8:32am
Total Order Count   68        54%              0.00              0.00            0.00

24 Hrs or Less        54%                       

2 Days                    10%

3 Days                    12%

4 Days or Greater   24%

Ok... above is the output of my report.  The percentage fields going down (54%, 10%, 12% and 24%) count the number orders in each group and are percentages of the grand total (total order count of 68).  I'm trying to take those percentages and put them in the group header with the total order count.  I've created formulas (see formula below) based on group names (24 hrs or less, 2 days, etc).  As you can see at the top next to the total order count 68, the first formula works (54%).  The second formula should pull in 10% but does not.  All additional formulas appears as 0%.  Any ideas?  Thank you!

If GroupName ({@DaysToComplete}) = '24 Hours or Less' Then PercentOfCount ({v_service_order_complete.order_id}, {@DaysToComplete})
If GroupName ({@DaysToComplete}) = 2 Days' Then PercentOfCount ({v_service_order_complete.order_id}, {@DaysToComplete})
etc




IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jan 2013 at 8:53am
use a crosstab
IP IP Logged
db3712
Groupie
Groupie
Avatar

Joined: 30 Oct 2008
Location: United States
Online Status: Offline
Posts: 44
Quote db3712 Replybullet Posted: 22 Jan 2013 at 8:56am
Can't.  Multiple groups not listed are involved.  I have it filtered.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jan 2013 at 9:02am
you will have to use a sub report then
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