Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Very Interesting Crystal Problem - Please Help!! Post Reply Post New Topic
Author Message
DerekDOR
Newbie
Newbie


Joined: 04 May 2012
Location: United States
Online Status: Offline
Posts: 6
Quote DerekDOR Replybullet Topic: Very Interesting Crystal Problem - Please Help!!
    Posted: 11 Jun 2012 at 6:15am
Hi all,
 
I've created a report that groups records by an equipment class code, then takes the total breakdown costs of each record in the group, totals it for the entire group, and displays the average breakdown costs for that class code group.
 
The problem that I'm having is once I find the average breakdown costs for the group, I want to take the breakdown costs for each record and devide it by the group average to come up with a percentage for each record. It is making the calculations, but most are not correct because it is calculating the data at the same time.
 
I realize that crystal calculates in a certain order every time, so I tried playing with creating multiple sections and using "Whileprintingrecords", "whilereadingrecords" and "evaluateafter" in the formulas to no avail. I even tried creating sub-reports both ways (setting and passing the variables to the sub-report and vice versa...)
 
I am at a complete loss, but I know someone has had a need to do something similar before; I can't be the only crazy person :) ! I really just need some suggestions or ideas as I've just been running in circles the last week or so.
 
If someone is willing to help me out, I am more than willing to give any details, images and formulas that you need to help me. I'm sure the information that I have given so far is vague since I'm the only person who has spent weeks working on this impossible yet needed report...
 
Thanks for any help!!!!!!!!!!!!!!!!!!!!!!!!
IP IP Logged
DerekDOR
Newbie
Newbie


Joined: 04 May 2012
Location: United States
Online Status: Offline
Posts: 6
Quote DerekDOR Replybullet Posted: 11 Jun 2012 at 10:07am
I'm really desperate... Any advice or ideas would be super helpful! Thanks again!!
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 11 Jun 2012 at 10:17am
The only thing I can think of is having a subreport in the GH (you can also use that value in the FG) to do the average breakdown for the group (Pass the GH info to the subreport, then pass the average breakdown back through a shared variable).  I have no idea how much of a performance hit this will be on your report.

I hope this helps.
IP IP Logged
DerekDOR
Newbie
Newbie


Joined: 04 May 2012
Location: United States
Online Status: Offline
Posts: 6
Quote DerekDOR Replybullet Posted: 11 Jun 2012 at 10:26am
Thanks so much for the advice kevlray! That is something I haven't tried yet; I will give it a shot.
 
I'm out of ideas so anything and everything will help!!
IP IP Logged
DerekDOR
Newbie
Newbie


Joined: 04 May 2012
Location: United States
Online Status: Offline
Posts: 6
Quote DerekDOR Replybullet Posted: 15 Jun 2012 at 9:37am

kevlray,

Your suggestion did not work for me; however it did help me realize that I will not find a solution to this issue while using data that’s in database form.

 

HOWEVER, I did find a solution. I created a stored procedure which did the calculations for the average for each group and then connected to it as a data source (using the "Add Command" option in the Database Expert). So far, this seems to be satisfying my needs.

 

I truly appreciate your help and hope this information helps someone else with a similar problem!

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.015 seconds.