gwent Posted April 11, 2006 Share Posted April 11, 2006 This is driving me crazy. I am trying to sum the results of 3 Calculations and continue to get the wrong results. the Calculations return a 1 if certain criteria is met and alll I am trying to do is sum the 3 different results. i.e. Result A = 1, Result B = 2, and result C = 2 then the total would be 5. The Results A-C display as in a Sub Summary Report Part and the Total would also. Any help would be appreciated. This should be very easy so I must be missing something very simple. greg Quote Link to comment Share on other sites More sharing options...
blevey Posted April 12, 2006 Share Posted April 12, 2006 Greg, I'm not sure I understand. Are the Results A - C summary fields or calculation fields? Are they in a sub summary part? Is the Total also in a sub summary part or a Grand summary part. Is this a calculation field or summary field? Can you post an example file? Quote Link to comment Share on other sites More sharing options...
blevey Posted April 12, 2006 Share Posted April 12, 2006 Okay Now I'm having a Calculation problem and I think it's a simular issue. See attached example file. The On Time Percentage is combining all records and not just the sub summaries.. What I'm looking for is on time by customer for Customer 1 it should be 66.66% and for customer 2 it should be 50%, but instead I'm getting 60% ...Help please.. Quote Link to comment Share on other sites More sharing options...
CobaltSky Posted April 13, 2006 Share Posted April 13, 2006 Hi blevey, You're correct that gwent (greg) did not explain his problem clearly enough for us to be able to propose a solution. It seems likely that he simply needs to place a copy of the existing summary field into a Trailing Grand Summary part to get the desired effect - however that's just a guess, because we don't have much to go on here. In the meantime, I've taken a quick look at the file you posted. The issue in your case is that the calculation you are using is referencing the summary field directly - which means it retrieves an overall summary value (ie across all records in the found set) regardless of how the found set is sorted and whether it is appearing in a sub-summary part. To get the calculation to retrieve the summary values context-sensitively (ie with respect to a defined sub-summary and sort sequence) you will have to specify a break field for each reference to the summary field. This is done using the GetSummary( ) function. I am attaching a modified copy of your file in which GetSummary( ) is used appropriately and you will see that the On Time Percentage field value is now evaluating separately (and correctly) for each customer. Meanwhile, I also slightly simplified the syntax of the formula you were using for the On Time calculation field. Quote Link to comment Share on other sites More sharing options...
blevey Posted April 13, 2006 Share Posted April 13, 2006 Ray, I cannot thank you enough.... I never would have found that.. thanks again. BLevey Quote Link to comment Share on other sites More sharing options...
gwent Posted April 13, 2006 Author Share Posted April 13, 2006 Hey Guys sorry for the delay getting back to you. Attached is a sample zipped file I created to try and explain what I need. What I am trying to get is the Total Number of Instances Marination exceeds 3 days. This would be the a Total of all 3 Marinated Products. I tried using the get summary function but I am still doing something wrong. Your help will be appreciated. greg Quote Link to comment Share on other sites More sharing options...
blevey Posted April 14, 2006 Share Posted April 14, 2006 Well thank to the help form Ray on my issue, I was able to fix yours. I had to make some changes but here's the fixed file. I believe the break field has to be on the same table, so I added the Field: Rest Name as a calculation = Restaurants::restaurant_name and changed the subsummaries. I wish I could explain it better, but here's the fix. Blevey Quote Link to comment Share on other sites More sharing options...
gwent Posted April 14, 2006 Author Share Posted April 14, 2006 Thanks, I'll give it a try greg Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.