Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Want to display % of grand total in group header

Posted on 2009-07-16
3
Medium Priority
?
645 Views
Last Modified: 2012-06-27
Hi Experts!

I have been looking through Crystal Reports answers in the Knowledge base for over an hour and still haven't found my answer, so it's time to post a question.

I am running Crystal Reports XI.

I want to show the current part number's "Issued x Cost" value as a percentage of the total report's "Issued x Cost" value.  I want to display this number in the group header as "% of Total".

Please keep in mind that "Issued" is a summed value from many transactional records.  The "parttran.tranqty" is accumulating in the Detail line, which is suppressed.  The formula for "Issued x Cost":
Sum ({parttran.tranqty}, {part.partnum}) * {partcost.avgmaterialcost}

Right now my "% of Total" calc is as follows:
({@Issued x Cost} / {@Report Total}) * 100

Boiled down, here's how the "% of Total" is working NOW:
Value          %
---------     --------
100          100.00%  (% of 100)
200           66.66%   (% of 300)
300           50.00%  (% of 600)
400           40.00%  (% of 1000)
500           33.33%  (% of 1500)

Here's how I WANT it to work:
Value          %
---------     --------
100             6.66%  (% of 1500)
200           13.33%  (% of 1500)
300           20.00%  (etc)
400           26.66%
500           33.33%

Please let me know what other data I can provide you to help me figure this out.  Thank you!!
Crystal-Example.doc
0
Comment
Question by:MTaft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
James0628 earned 2000 total points
ID: 24875692
 The way that you're using {partcost.avgmaterialcost} in the "Issued x Cost" formula, I assume that it's the same for every record in a {part.partnum} group.  If so, try creating a new formula like this:

{parttran.tranqty} * {partcost.avgmaterialcost}


 Sum ({@new formula}, {part.partnum})

   should return the same result as

 Sum ({parttran.tranqty}, {part.partnum}) * {partcost.avgmaterialcost}

 Correct?  The difference is that by applying avgmaterialcost at the detail level, you can now do a simple summary on the new formula to get the total for the group (instead of having to multiply the summary by avgmaterialcost), and you can do another summary on the new formula and have CR show it as a percentage of the grand total for the new formula.

 James
0
 
LVL 1

Author Closing Comment

by:MTaft
ID: 31604395
Thank you, that was exactly what I needed!  I have been having this problem in another report as well and now I can fix that one too.  Much appreciated!!
0
 
LVL 35

Expert Comment

by:James0628
ID: 24883971
You're welcome.  Glad I could help.

 James
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question