If this is an unfiltered portal, you can define a calculation field in the layout's table that Sums this field. It's expression would be similar to this:
Sum ( PortalTable::UnitsOnHand )
D you mean i can define a calculation field in the portal setup -> filter portal records?
Sorry I'm still confuse.
I already have this simple calculation in my UnitOnHand field.
Your portal is placed on a layout. The layout is based on a table occurrence. I cannot tell the name of that table occurrence. It is linked to a table occurrence specified for your portal. I also cannot tell the name of that table occurrence. (Table occurrences are the "boxes" found in Manage | Database | Relationships.) So I called the table occurrence for your portal "portalTable".
You would define a new field of type calculation in the layout's table. It should evaluate from the context of the layout's table occurrence and sum the related field in the related portal table by referencing the portal's table occurrence.
Sum ( PortalTable::OnHandField )
May I know what is the purpose of the dotted line and where can I get that line?
That line shows the limits of your layout's printable area. Objects to the right of it will not print when the layout is printed using the currently specified options for page size and page orientation. If you open Print Set up and select a different size or orientation while in layout mode, you'll see this line change to show the new printable area.