December 15, 200520 yr OK, I have a PO system with a line item portal. Pretty standard, from my understanding. The portal records are related by Purchase Request #, so the recid of the purchase request is auto-entered into the line item, hence the record in the line items database. I have a line item total, now I just need to total all the line items with like por#'s. I really have no idea where to start with this. Please help! Thanks!
December 15, 200520 yr create a new TO (table occurence) and use your foreign key PO# as the key field. Lets call this new TO to be called "LikePO". In your line items table, create a field called "LikePOtotal" = sum(LikePO::LineTotal) where "LineTotal" is your total for the line item ie, Quantity * Cost.
December 15, 200520 yr A new TO is unnecessary here. Using the existing structure, you can add a Sum() calc to the PO table that totals the related line items: Define in the PO table: PO Total (calculation, number result) = sum ( Line Item::Line Total ) This type of calc is good for viewing the total on the screen, like underneath the PO lines portal. For printouts, it's usually better to print from the line items table using sub-summary parts. In this case, use a summary total field to total the line items in the found set: Define in the Line Item table: Total (summary) = total of Line Total Placing this field on a 'Sub-Summary by PO#' part will give the total once for the PO.
Create an account or sign in to comment