Running Total Percentage
Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22415
Printed Date: 02 May 2024 at 1:22am
Topic: Running Total Percentage
Posted By: cantercf
Subject: Running Total Percentage
Date 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
|
Replies:
Posted By: Sastry
Date 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
|
Posted By: cantercf
Date 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
|
|