Basic Reports - Address fields
Contents
Report Builder Designer is an Advanced User feature. |
This note describes how a user who is familiar with using Report Builder can change the contents of Basic Reports' address memo fields.
Note: Trailing spaces are trimmed on contact and address fields when reports are printed.
Address Fields
It is normal for each Basic Report to have three address fields:
- Company address;
- Invoice To address (also known as Order To address on the Purchase Order report);
- Deliver To address.
These are setup as memo fields, which may contain text, directives or tags. If not required on a report, the standard address memo fields may be hidden (by unticking the "visible" flag on Report Builder's right-click context menu), but should not be deleted from the report template.
Company Address field
We suggest using the following "lines" setting in the 'eHAddrCompany
' memo field:
<%SkipEmpty%><%NO DoubleName%> [<%Company name%> | <%Contact name%>] <%BulkAddress%> <%Address1%> <%Address2%> <%Locality%> <%Town%> <%County%> <%Postcode%> <%Tel1%> <%Fax1%> <%Email%> <%Web%> <%VATNumber%>
Invoice To Address field
We suggest using the following "lines" setting in the 'eInvAddress
' memo field (this should also used as the Supplier address memo field 'eSupAddress
' on Purchase Order):
<%SkipEmpty%><%NO DoubleName%> <%Contact name%> [<%Organisation%>|<%Company name%>|<%Contact name%>] <%Address1%> <%Address2%> <%Locality%> <%Town%> <%County%> <%Postcode%> <%Country%> <%br%>[Fax: !]<%Fax1%>
In the above examples, the contact's name and address appear above the company name. If they are identical to the company name they will only print once because the <%NO DoubleName%>
directive is in force. If you don't want an individual's name to be printed when sending to a company, remove the <%Contact name%>
line from the above.
Deliver To Address field
We suggest using the following "lines" setting in the 'eDelAddress
' memo field:
<%SkipEmpty%><%NO DoubleName%> <%Contact name%> [<%Organisation%>|<%Company name%>|<%Contact name%>] <%Address1%> <%Address2%> <%Locality%> <%Town%> <%County%> <%Postcode%> <%Country%> <%br%>[Tel: !]<%Tel1%> [Mobile: !]<%TelMobile%>
As with the "Invoice To" address, in the above example, the contact's name and address appear above the company name. If they are identical to the company name they will only print once because the <%NO DoubleName%>
directive is in force. If you don't want individual's names printed when sending to a company, remove the <%Contact name%>
line from the above.
Adding Additional Address Fields
If you are using integrated labels, you may wish to print the Delivery To address twice: once on the report and also on the peel off label. It is possible to add additional address fields to a Basic Report by doing the following:
- Double click on the Report you would like to edit.
- Click on
- Click on the Memo button to the top left of the Menu bar.
- Click in the report to add the Memo component to the report; this will be used to display the Address.
- Set the memo field's UserName property to some unique value (e.g. PeelOffFooterDeliveryAddress).
- Edit the memo lines either clearing them (so it will output the same as the original address field) or setup an address template (as for the original address fields: see above). To do this:
- Focus on the Memo component, right click and select from the Context Menu.
- Enter the address information, you can copy and paste the address information.
- Save the report template and exit designer.
- Back in the setup dialog, press button. This is so the front and back address setup can link together.
- Use the button to add a new line for each address memo field added (in this case, one line).
- Set each address to have (see image below):
- Address type (e.g. Company Address, Invoice Address, Delivery Address).
- Report Component Name - the name you set as memo's UserName (e.g. PeelOffFooterDeliveryAddress).
- Custom Formatting - when ticked, the memo will use the address template (therefore allowing you to edit how the address is printed); if left it unticked the original address template will be used.
- Press "OK" to save changes.
You can also select addresses to remove (but don't remove the actual component, simply hide it; all that happens is the unused components will be ignored when processing addresses).
Directives and Tags
Various directives and tags can be used in Basic Reports' address fields. Please note:
- Tags are case insensitive;
- Spaces within the
<%...%>
tag are ignored, so the following directives would be treated the same:<%No skip Empty%>
,<%NOSKIPEMPTY%>
,<% NO SKIPEMPTY%>
; - Each tag must start and end in the same line.
Directives
These directives can be used in address memo fields:
Directive | Description |
---|---|
<%SKIPEMPTY%> (default) | Skip empty lines (do not leave empty lines in address) |
<%NO SKIPEMPTY%> | Leaves empty lines, if any |
<%DOUBLENAME%> (default) | Allow double names (i.e. contact name and company name are the same in the following lines) |
<%NO DOUBLENAME%> | If two (or more) sequential lines are identical, only one instance will be displayed. This is useful when you want to display both contact name and company name, but suppress duplicates (e.g. as is commonly found in residential mail order delivery addresses) |
<%SUPPRESS N/A%> | Any tag value equal to "n/a" or "empty" is changed to empty string (suppressed) |
<%NO SUPPRESS N/A%> (default) | Opposite; it will display "n/a" if the value is "n/a" |
Note: Each type of directive tag (e.g. SKIPEMPTY, DOUBLENAME) sets a boolean value applicable to the entire memo address field. So, if an address memo field contains more than one instance of the same type of directive tag, it is the last occurrence of that tag which sets the directive.
Formatting tags
There is currently only formatting tag:<%BR%>
- insert a new line.
Data field tags
Use these tags to include a data field within an address memo field:
Tag | Description |
---|---|
<%COMPANYNAME%> | Company name |
<%TITLE%> | Contact title |
<%FORENAME%> | Contact forename |
<%SURNAME%> | Contact surname |
<%CONTACTNAME%> | Contact full name, comprising title + forename + surname. |
<%ORGANISATION%> | Organisation name |
<%ADDRESS1%> | Address data |
<%ADDRESS2%> | Address data |
<%LOCALITY%> | Address data |
<%TOWN%> | Address data |
<%COUNTY%> | Address data |
<%POSTCODE%> | Address data |
<%COUNTRY%> | Address data |
<%BULKADDRESS%> | Address in one line, can contain #13#10 codes to split lines. Use this one to retrieve address from Brand |
<%TEL1%> | Address/contact telephone |
<%TEL2%> | (currently empty) |
<%TELMOBILE%> | Contact mobile telephone |
<%FAX1%> | Address/contact fax |
<%EMAIL%> | Address/contact email |
<%WEB%> | Company website |
<%JOBTITLE%> | Contact job title |
Fields below are intended for use with own company address, but show values from brand, where appropriate:
Tag | Description |
---|---|
<%VATNUMBER%> | VAT Number field |
<%REGISTEREDNUMBER%> | Company registered number field |
<%REGISTEREDOFFICE%> | Company registered office address field |
Operator tags (alternatives)
The following operators may be used in conjuction with the address memo field's data field tags:
-
[ ALTERNATIVE_1 | ALTERNATIVE_2 .. | ALTERNATIVE_NNN ]
the first non-empty string alternative is displayed.- For example, the following would display contact name if not empty, otherwise display company name:
[<%CONTACTNAME%> | <%COMPANYNAME%>]
- For example, the following would display contact name if not empty, otherwise display company name:
Operator tags (conditional)
-
[!SOMETHING]
- display 'something' only if not on the beginning of the line, nor preceded by space(s).- For example:
<%TITLE%>[! ]<%SURNAME%> from
if Title ='Mr', Surname = 'Smith', this will display 'Mr Smith from'
if Title =, Surname = 'Smith', this will display 'Smith from'
- For example:
-
[SOMETHING!]
- display 'something' only if not on the end of the line, nor followed by space(s).- For example
[Dear !]<%ContactName%>
if ContactName = 'Mr Joe Smith', this will display 'Dear Mr Joe Smith'
if ContactName is blank (empty), this will display nothing
- For example
-
[!SOMETHING!]
- display 'something' only if between two other words.- For example the following won't display a space if either Title or Surname is empty:
<%TITLE%>[! !]<%SURNAME%>
- For example the following won't display a space if either Title or Surname is empty: