gowrann Posted October 8, 2002 Posted October 8, 2002 I have a "Total Amount" field for each item in my Item db, how do I get the totals automatically calculated of related items in my SalesRep db which have many sales reps and can have or not have each item. The 2 files are related by an "Item No." the sales reps quantities are manually entered - but I wish to auto calculate the total of each particular product.
CobaltSky Posted October 8, 2002 Posted October 8, 2002 I'm not entirely clear what it is you are wanting to total, but it seems that it is a value in your items db, and you want a total of all related occurrences of that value to be automatically calculated in your SalesRep db? This being the case, you should create an unstored calculation (number) field in the SalesRep db with a formula along the lines of: Sum(YourRelationshipToItems::YourDesiredValueField) However precisely which values are summed will depend entirely on how your relationship to items is set up. If you want to see a sum only of items specific to a particular sales rep, you may require an additional relationship which concatenates item and salesrep in each file, to use as the vehicle for the Sum function.
gowrann Posted October 8, 2002 Author Posted October 8, 2002 Ray What I am wanting to total is the items in the SalesRep db that are relevant to the items db and autocalculate the TotalAmount in the items db. Thus item db ItemCode=2 Item=RedBall TotalAmount = 6 SalesRepdb Rep=John ItemCode=2 Amount=2 Rep=Paul ItemCode=2 Amount=2 Rep=Peter ItemCode=2 Amount=2 These currently have a r/s with the "ItemCode" field. Thanks Neil
gowrann Posted October 8, 2002 Author Posted October 8, 2002 Got it. Made "TotalAmount" a calculation in item db Sum(SalesRepdb::Amount) (Viewing the related records through a portal) Thanks Ray
Recommended Posts
This topic is 8438 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now