Hi there,
I have an table called SL_ADDRESSES that stores the the address like so;
Field: AD_Address - this holds all the address lines to the town. It has a carriage return sysmbol (square) between each return.
Field: AD_ADDRESS_USER1 - this is the town
Field: AD_ADDRESS_USER2 - this is the county
Field: AD_POSTCODE - this is the postcode.
The problem is the report cuts off the postcode and county etc. if the main address line (AD_Address) has more than 2 carriage returns. The formula used at the moment is below.
whileprintingrecords;
Stringvar Invoice_Address;
Invoice_Address := "";
If not IsNull({SL_ACCOUNTS.CUNAME}) and ({SL_ADDRESSES.AD_ACCOUNTNAME})=0 then //AD_ACCOUNTNAME is TRUE if Exclude Account Name on addresses is selected
Invoice_Address:={SL_ACCOUNTS.CUNAME}+chr(13);
If not IsNull({SL_ADDRESSES.AD_ADDRESS}) then
Invoice_Address:=Invoice_Address+TrimRight({SL_ADDRESSES.AD_ADDRESS})+chr(13);
If not IsNull({SL_ADDRESSES.AD_ADDRESS_USER1}) and Length({SL_ADDRESSES.AD_ADDRESS_USER1})>0 then
Invoice_Address:=Invoice_Address+{SL_ADDRESSES.AD_ADDRESS_USER1}+chr(13);
If not IsNull({SL_ADDRESSES.AD_ADDRESS_USER2}) and Length({SL_ADDRESSES.AD_ADDRESS_USER2})>0 then
Invoice_Address:=Invoice_Address+{SL_ADDRESSES.AD_ADDRESS_USER2}+chr(13);
If not IsNull({SL_ADDRESSES.AD_POSTCODE}) then
Invoice_Address:= Invoice_Address+{SL_ADDRESSES.AD_POSTCODE};
Invoice_Address;
Can you help.
Thanks
I have an table called SL_ADDRESSES that stores the the address like so;
Field: AD_Address - this holds all the address lines to the town. It has a carriage return sysmbol (square) between each return.
Field: AD_ADDRESS_USER1 - this is the town
Field: AD_ADDRESS_USER2 - this is the county
Field: AD_POSTCODE - this is the postcode.
The problem is the report cuts off the postcode and county etc. if the main address line (AD_Address) has more than 2 carriage returns. The formula used at the moment is below.
whileprintingrecords;
Stringvar Invoice_Address;
Invoice_Address := "";
If not IsNull({SL_ACCOUNTS.CUNAME}) and ({SL_ADDRESSES.AD_ACCOUNTNAME})=0 then //AD_ACCOUNTNAME is TRUE if Exclude Account Name on addresses is selected
Invoice_Address:={SL_ACCOUNTS.CUNAME}+chr(13);
If not IsNull({SL_ADDRESSES.AD_ADDRESS}) then
Invoice_Address:=Invoice_Address+TrimRight({SL_ADDRESSES.AD_ADDRESS})+chr(13);
If not IsNull({SL_ADDRESSES.AD_ADDRESS_USER1}) and Length({SL_ADDRESSES.AD_ADDRESS_USER1})>0 then
Invoice_Address:=Invoice_Address+{SL_ADDRESSES.AD_ADDRESS_USER1}+chr(13);
If not IsNull({SL_ADDRESSES.AD_ADDRESS_USER2}) and Length({SL_ADDRESSES.AD_ADDRESS_USER2})>0 then
Invoice_Address:=Invoice_Address+{SL_ADDRESSES.AD_ADDRESS_USER2}+chr(13);
If not IsNull({SL_ADDRESSES.AD_POSTCODE}) then
Invoice_Address:= Invoice_Address+{SL_ADDRESSES.AD_POSTCODE};
Invoice_Address;
Can you help.
Thanks