Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Running Total Percentage Post Reply Post New Topic
Author Message
cantercf
Newbie
Newbie
Avatar

Joined: 28 Jun 2017
Location: United States
Online Status: Offline
Posts: 2
Quote cantercf Replybullet Topic: Running Total Percentage
    Posted: 17 Aug 2017 at 11:07am
WhilePrintingRecords;
NumberVar Qty;

Qty:= Qty + Sum ({IMINVTRX.quantity}, {IMINVTRX.item_no})

This next section fails :

WhilePrintingRecords;
Numbervar Pct;
//Pct:=PercentOfSum (Sum ({IMINVTRX.quantity}, {IMINVTRX.item_no}), Sum ({IMINVTRX.quantity}))
//Pct:=Sum ({IMINVTRX.quantity}, {IMINVTRX.item_no})/Sum ({IMINVTRX.quantity})

What I am trying to accomplish is a running total by group followed by the percentage of the group total to grand total:

Group 1    Running Ttl 100 10%
Group 2    Running Ttl 250 25% etc etc

Both of the lines marked "//" failed.

Please advise...I don't have any more hair to pull out trying to do this
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 18 Aug 2017 at 3:44am
Hi

i don't think running total is required in this scenario:

To get total :

Right click on {IMINVTRX.quantity} field and go in Insert =-- Summary--select group

To get percentage :
Now again right click on same filed and insert -- summary, select {IMINVTRX.item_no} as group level then you will see Percentage option enabled. Now select percentage at grand total.

This will insert group level percentage based on grand total of your report.
Thanks,
Sastry
IP IP Logged
cantercf
Newbie
Newbie
Avatar

Joined: 28 Jun 2017
Location: United States
Online Status: Offline
Posts: 2
Quote cantercf Replybullet Posted: 18 Aug 2017 at 4:00am
Unfortunately that is giving me the percentage of the group total to the grand total.

I am looking for the running total percentage to total quantity.

I have a list of 1,000 purchased items of various quantities purchased YTD. I want to follow the 80/20 rule and analyze 80% of the total quantity purchased. That may be the first 10 items, 15 items, or 30 items so I am using the running total to add the quantities and they compute the 80% of quantity purchased.

thank you for your help
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.016 seconds.