Need more, need help now?
- - - - - - - - - - - - - - - - - - pay-as-you-go support - no contract - tenth of an hour billing - expert help - fast service - no call queues
Need integration?
- - - - - - - - - - - - - - - - - - with your shipping system - website - invoicing system - crm - cms - manufacturing - order import - back to back orders..
Need a report?
- - - - - - - - - - - - - - - - - - Excel reporting that pulls data from Sage - custom layouts - layouts that change adapt to your brands and/or for drop shipping.
Want web hosting?
- - - - - - - - - - - - - - - - - - Your own domain name - email - a shop - wordpress - woo commerce - ticket systems - help desks - forums - portals

If, Then, Else Statement

Report design issues and solutions.
Post Reply
AnnieVic
User
User
Posts: 6
Joined: 05 Feb 2020, 15:45
Sage Version: Other

If, Then, Else Statement

Post by AnnieVic » 11 Feb 2020, 14:35

Good afternoon,

I am currently designing a Sage report for importing as a csv to a courier app for international customs invoices and am looking for help with If, Then, Else Statements.

On Sage I have designated INVOICE.NOTES_2 as the 'cell' in which a 'Y' should be placed by the user if a customs invoice is required. If the cell has a 'Y' then a series of information needs to included in the csv, if not 'Y', then leave it blank or "". The expressions I have created are:

INVOICE.NOTES_2 in ("Y","y")? "Commercial" : ""
INVOICE.NOTES_2 in ("Y","y")? INVOICE.INVOICE_NUMBER : ""
SALES_DEL_ADDR.COUNTRY_CODE in("AU")? "N" : ""
INVOICE.NOTES_2 in ("Y","y")? "GB550187XXXXXX" : ""
INVOICE.NOTES_2 in ("Y","y")? "GB" : ""
INVOICE.NOTES_2 in ("Y","y")? "0.00" : ""
INVOICE.NOTES_2 in ("Y","y")? INVOICE.ANALYSIS_1 : ""
INVOICE.NOTES_2 in ("Y","y")? SALES_DEL_ADDR.VAT_REG_NUMBER : ""
INVOICE.NOTES_2 in ("Y","y")? SALES_DEL_ADDR.TELEPHONE : ""
INVOICE.NOTES_2 in ("Y","y")? SALES_DEL_ADDR.E_MAIL : ""

The problem is, whilst the expression is accepted, it produces a blank csv

Thanking you in advance.
Ann

User avatar
brucedenney
Site Admin
Site Admin
Posts: 4616
Joined: 28 Feb 2006, 09:56
Sage Version: v28 UK/Europe/Africa

Re: If, Then, Else Statement

Post by brucedenney » 11 Feb 2020, 15:50

Can you attach your layout to a post so I can have a look at what you have done.

I would expect you to get a lot of empty fields at the very least.
For just about anything Sage :- Discount subscriptions, pay-as-you-go support, application integration, reports, layouts, linked excel spreadsheets, analysis or any other help making life with sage easier/less time consuming Contact me.

AnnieVic
User
User
Posts: 6
Joined: 05 Feb 2020, 15:45
Sage Version: Other

Re: If, Then, Else Statement

Post by AnnieVic » 11 Feb 2020, 15:58

Hi Bruce,

Please find attached.
Login to access the files attached to this post.

User avatar
brucedenney
Site Admin
Site Admin
Posts: 4616
Joined: 28 Feb 2006, 09:56
Sage Version: v28 UK/Europe/Africa

Re: If, Then, Else Statement

Post by brucedenney » 11 Feb 2020, 16:55

After removing the Sales_del_addr table I got it to work, but you seem to be reliant on data stored in the table, which you can't really reliably link to.

The "Bodge" method of linking it to relies on the address in the table being the same as the one on the invoice.

Did your source data have matching records for the Delivery Address in the Sales_del_addr table. I.E. that had exactly the same address?
Login to access the files attached to this post.
For just about anything Sage :- Discount subscriptions, pay-as-you-go support, application integration, reports, layouts, linked excel spreadsheets, analysis or any other help making life with sage easier/less time consuming Contact me.

AnnieVic
User
User
Posts: 6
Joined: 05 Feb 2020, 15:45
Sage Version: Other

Re: If, Then, Else Statement

Post by AnnieVic » 13 Feb 2020, 15:50

Hi, Thank you so much for the V3 copy.

Yes is the answer to the address question.

User avatar
brucedenney
Site Admin
Site Admin
Posts: 4616
Joined: 28 Feb 2006, 09:56
Sage Version: v28 UK/Europe/Africa

Re: If, Then, Else Statement

Post by brucedenney » 13 Feb 2020, 16:50

If the addresses are exactly the same then the original should have worked.
For just about anything Sage :- Discount subscriptions, pay-as-you-go support, application integration, reports, layouts, linked excel spreadsheets, analysis or any other help making life with sage easier/less time consuming Contact me.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests