Basic Reports - Address fields



WARNING icon
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:

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:

  1. Double click on the Report you would like to edit.
  2. Click on Basic Report Design button
  3. Click on the Memo Basic Reports memo button button to the top left of the Menu bar.
  4. Click in the report to add the Memo component to the report; this will be used to display the Address.
  5. Set the memo field's UserName property to some unique value (e.g. PeelOffFooterDeliveryAddress).
  6. 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:
    1. Focus on the Memo component, right click and select Basic Reports menu option Lines from the Context Menu.
    2. Enter the address information, you can copy and paste the address information.
  7. Save the report template and exit designer.
  8. Back in the setup dialog, press Basic Reports addresses button. button. This is so the front and back address setup can link together.
  9. Use the BtnNewItemOld.jpg button to add a new line for each address memo field added (in this case, one line).
  10. 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.
      Basic Reports Addresses configuration
  11. 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%>]

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'
  • [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
  • [!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%>

See Also


Did you find this article helpful?