Summary
Description
When adding a product's unit weight to an invoice, sales order, purchase order or product report or layout in Report Designer, there are several things you need to consider:
- Do you want to show the weight of one unit of stock or the total weight for each item line?
- Do you want to show the weight against each item line or as a total weight in the footer section?
- Once you add a stock item to your layout, you must ensure that message lines, M, and special stock codes, S1, S2 and S3 are picked up.
Depending on your requirements, you can add the individual unit weight using the STOCK.UNIT_WEIGHT variable, or calculate total weight by adding an expression.
Resolution
Add the weight of one unit of stock
- Select the document you want to amend, then click Edit.
- If required, to make space on the layout you can click and drag items.
- On the menu bar click Toolbox, then click Add Data Field.
- Click once in the blank space on the item line where you want the data field to appear.
You can learn more about moving or resizing existing objects through our help guide. - In the Add Data Field window, expand the STOCK table.
- Click UNIT_WEIGHT then click OK.
- In the Properties pane, in the Function drop-down click None.
TIP: If you can't see the Properties pane mentioned below, on the menu bar click View then click Properties pane. If the pane doesn't appear, you can reset the Report Designer view to its default. - If required, click and drag to move or resize the data field.
- On the menu bar click File, then click Save As.
- Enter a new file name then click Save.
- On the menu bar click File, then click Exit.
Add the total weight for the item
Add a weight expression
- Select the document you want to amend, then click Edit.
- In Report Designer, on the menu bar click Toolbox.
- Click Add Expression then click the document where you want the total weight to appear as follows:
- For individual item weights, click the relevant item line section.
- For a grand total, click the relevant footer section.
- In the Expression window, enter one of the following expressions based on your document type:
Invoice layout INVOICE_ITEM.QUANTITY * STOCK.UNIT_WEIGHT Sales order layout SOP_ITEM.QTY_ORDER * STOCK.UNIT_WEIGHT Purchase order layout POP_ITEM.QTY_ORDER * STOCK.UNIT_WEIGHT 
- Click OK.
Set the correct function
If you're adding the weight expression to the item line, you must ensure the Function property is not set to Sum. If you're adding the weight expression to the footer section that contains the totals, for example to show a grand total weight for the order, you must set the Function property to Sum.
- For each expression you added, click the expression then in the Properties pane, in the Function drop-down click Sum or None as required.
TIP: If you can't see the Properties pane mentioned below, on the menu bar click View then click Properties pane. If the pane doesn't appear, you can reset the Report Designer view to its default. Read more > - To save your document, on the menu bar click File, then click Save As.
- Enter a new file name then click Save.
- On the menu bar click File, then click Exit.
Upgrade your licence
Growing business? Add more companies, users, or employees to your licence with ease. Leave your details and we’ll be in touch.
