Sage Report Designer ("IF" Statements)

S

sambrereton

Hello,

I am fairly new to Sage Report Designer but I have created a pretty good invoice design that suits my needs, however I am wishing to do something a bit out of the box here.

I need to create an expression that either

1. Says PAID if the Total Amount Due equals $0.00
2. Says UNPAID if the Total Amount Due exceeds $0.00

I've tried to create an IF statement, however I cannot get the expression editor to accept the query, which is in all senses, fairly logical (well for someone from a VB6/VB.NET background)

If INVOICE.FOREIGN_INVOICE_GROSS - INVOICE.FOREIGN_AMOUNT_PREPAID = Value("0.00") Then Cstring("PAID") Else CString("UNPAID")

I'm not sure if I am doing it correctly, could anyone point out how to do this properly within Sage?

Thanks,

Sam.
 
S

sambrereton

Thank you so much for your reply,

It works!

However, I want to tweak it a bit more with different colours

If it is UNPAID then the colour of the expression will be Red.

However if it is PAID then the colour will be green.

Any idea how to add this to the working formula?

Thanks,

Sam
 
Upvote 0
Yes, it can be done as follows:

Select the Expression then, in the Properties window select Text Style and set the Colour to Green - this will act as the default colour.

Next, select Conditional Formatting and, in the window that appears, set the filter to:

INVOICE.FOREIGN_INVOICE_GROSS - INVOICE.FOREIGN_AMOUNT_PREPAID <> 0

Then select the Properties Tab and, in the Text Style, set the colour to Red.

This way, text will default to green but, where the invoice is unpaid, the colour will be red.

HTH

John
 
  • Like
Reactions: sambrereton
Upvote 0

Latest Articles

Join UK Business Forums for free business advice