Jump to content

Totaling Like Portal Rows


chevell

This topic is 6700 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 6700 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.