Page 1 of 1

Calculating Despatch Weight

Posted: 07 Feb 2020, 15:28
by AnnieVic
Good afternoon I hope this finds everyone well on this Friday afternoon?

I am new to the world of creating a report in Sage designer from scratch and am looking for help with how to get an expression correct.

The expression in question is for the total weight of invoice items plus the weight of the outer carton (0.15kg)

The expression I have is INVOICE_ITEM.QUANTITY*STOCK.UNIT_WEIGHT+0.15

The problem is the result is wrong.

Example: Invoice has 3 items

Item 1 weighs 0.19kg and qty is 2
Item 2 weighs 0.12kg and qty is 3
Item 3 has NO weight (it is a service item) but is qty 1

The above expression is calculating at 1.19kg instead of the 0.89kg

Would somebody be kind enough to tell me (in the most simplest of terms) how to fix this?

Thank you
Ann

Re: Calculating Despatch Weight

Posted: 07 Feb 2020, 15:58
by brucedenney
Hi Ann

you need to oinly add the .15 once.

To do this, you do your expression in the footer and it will sum all the lines give it a name eg total_weight. Make the expression not print using the property supress print = true.
Now add another expression in the footer, this does not want to be a sum, it wants to be total_weight + 0.15 this will give you the value you want.

Re: Calculating Despatch Weight

Posted: 11 Feb 2020, 14:03
by AnnieVic
Thank you. Works a treat