This one has been solved. I was running the calculation at the wccode
summary level, which according to the displayed numbers of rate and
hours, should be correct. But in reality, it was taking the hours
from the last detail record in the group and multiplying that by the
rate. I put the caluclation in at the detail level and it works great
now.
Thanks anyway,
Bruce
--- In vantage@yahoogroups.com, "brucewbrannan" <bruce.brannan@w...>
wrote:
summary level, which according to the displayed numbers of rate and
hours, should be correct. But in reality, it was taking the hours
from the last detail record in the group and multiplying that by the
rate. I put the caluclation in at the detail level and it works great
now.
Thanks anyway,
Bruce
--- In vantage@yahoogroups.com, "brucewbrannan" <bruce.brannan@w...>
wrote:
> Hi,
>
> We have built a crystal report displaying quote labor information.
> ___________________________________________
> For setup we have calculated fields called:
>
> SetupHours =
> {QuoteOpr.EstSetHours}*{QuoteOpr.SetUpCrewSize}*{QuoteOpr.Machines}
>
> SetupRate = {QuoteOpr.SetupLabRate}+{QuoteOpr.SetupBurRate}
>
> SetupCost = {@SetupRate}*{@SetupTotal}
>
> For production we have calculated fields called:
>
> ProdHours =
> {QuoteOpr.ProdStandard}*{QuoteOpr.ProdCrewSize}*{QuoteOpr.Machines}
>
> ProdRate = {QuoteOpr.ProdLabRate}+{QuoteOpr.ProdBurRate}
>
> ProdCost = {@ProdTotal}*{@ProdRate}
> ____________________________________________
>
> The report properly displays sums of SetupRate, SetupHours, ProdRate
> and ProdHours. When it calculates SetupCost and ProdCost, however, it
> gives strange results. Occasionally, the SetupCost is correct but
> more-often far too small and the same results with ProdRate, except
> where we have a EstSetHours = 0 or ProdStandard = 0, it always
> properly calculates 0.
>
> I don't understand why, when two numbers that display correctly and
> are multiplied, the answer comes out wrong.
>
> If it helps, we are using three tables. QuoteHdr, QuoteDtl, QuoteOpr.
> QuoteHdr has joins of Company and QuoteNum to QuoteDtl. QuoteDtl has
> joins of Company, QuoteNum, and QuoteLine to QuoteOpr.
>
> Any help is much appreciated,
>
> Bruce Brannan
> Engineered Products Department