Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jim Carls
  Where is Jim Carls?
 Tennessee - United States
 Jim Carls
Subject: Summing header & detail numeric values
Thread ID: 248837 Message ID: 248837 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Wednesday, December 23, 2009 5:38:53 PM         

I'm working on a purchasing management report that summarizes vendor activity. This will include sums of freight cost quotes and freight cost actuals. Since a quote applies to the whole order (header) and actual freight costs may apply to individual items (especially if an order is billed in increments driven by an installation schedule), I need to sum the detail of the line items without adding the quote amount more than once.

I've done this kind of thing before, using the fact that every header entity will have a line item #1 and using an iif() to only add the value if the line ID is 1. However, I've wondered if there is a more elegant way to do this without depending on an assumption like that. Thanks for any comments...


Summing header & detail numeric values Posted by Jim Carls @ 12/23/2009 5:38:53 PM
RE: Summing header & detail numeric values Posted by M. Akram Bhatti @ 12/23/2009 7:26:10 PM