Sage Report Designer Invoice Expression statement help


I'm editing the invoice layouts for my company, and I need to total up cost of labour and materials for each invoice.

If I enter line items under the right nominal codes, is there then an expression I can use at the bottom of the invoice footer to show the total net value allocated to each nominal code, i.e. 4000 = Labour / 4001 Materials?

Many thanks
Chris CadeyHead of ITAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bruce DenneySage 50 Consultant and IntegratorCommented:
In the details section add an expression  field "Labour" and an expression field "Materials"

Labour Expression is

So if it is Labour then the value is the net amount, otherwise it is zero

Do the same sort of thing for Materials

In the footer section you can now add up put in an expression which is the sum of the expressions above.

You probably do not want them to actually print in the details section so set the suppress print property to true so they are hidden

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Chris CadeyHead of ITAuthor Commented:
Thanks for that, seems to be working though I had to tweak slightly, didn't work as you put it, but does work when written as :


Only problem I have now is the both the result and the total at the bottom, have lots of extra zero's, how do I concatenate to the normal 2 numbers after the decimal. e.g. :


obviously I need it to be 2387.99

For the total expressions I'm currently using :


Expr15 being the labour expression.  Needed the unsigned to stop the minus sign for Credit Notes.

Thanks again.
Bruce DenneySage 50 Consultant and IntegratorCommented:
You need to alter the expression display formats to be 2 decimal places.

Select the expression, go to properties, find "Formatting", click the ... button on the right, select numeric tab and set it to 2 decimal places.
Bruce DenneySage 50 Consultant and IntegratorCommented:
P.S. You can name the expressions with more useful names other than ExprX  Eg Labour or Materials
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Tax / Financial Software

From novice to tech pro — start learning today.