In Touch with Dynamics GP

This blog is intended to be a useful resource for Microsoft Dynamics GP users and professionals in the UK and the wider Microsoft Dynamics GP community as a whole.

Tuesday, 12 October 2010

How to avoid blank address lines in Dynamics GP report writer.

This is one that is cropping up more and more with the advent of electronic mail reading systems. We have had several calls on the helpdesk from clients who have had mailings returned because of blank lines in the address which is stopping the electronic systems used by the post office reading the address correctly.

The issue is caused by the fact that not all customer or creditor addresses are long enough to use all the address fields. This means that there can be blank lines between the last address line used and the post code (Zip code for our cousins across the pond).

You can get round this using calculated fields.

Step1: create a new calculated field in report writer (I am using the RM statement on blank paper).



Step2 : Set the result type to string.



Step3: Select the function tab and then ‘user-defined’ and the function of ‘rw_selectAddrLine’ and insert.

Step 4: Now select the ‘constant’ tab and integer as type and the constant of 1… (this means the first address line. when you do a cal field for address line 2, 3, 4 etc.. the integer value will change accordingly to 1, 2, 3, etc.). Then select add.



Step 5: Next you must select all the address lines and add them.

From this example (RM statement) the resource is ‘rm statement header temp’

Then select address 1, 2, 3 city, state, zip and insert them all one by one





Step 6: Then once all the address lines have been added go to the Constant tab and select the type as ‘string’ and leave the constant blank and click insert

You will notice it inserts ‘’ you must insert 3 of these symbols..

The reason being you need to have 10 conditions..

So we selected the integer as ‘1’ in the beginning and then 6 address lines so we need 3 blank strings to get our total of 10.





Step 7: Now repeat steps 1 to 6 for each of the address lines (the above is the calc field for address line 1) you must create 5 further fields for address line 2,3 4 etc.. and remember the constant integer changes according to the number of the address line you are doing.. 1,2,3 etc..

Step 8: deploy the calculated field address lines in the report one underneath the other. The rw_selectAddrLine’ function will then take care of any blank lines when you run the report selecting the line if populated but if not picking the next populated line.

6 comments:

  1. Hello. I am using this calculation but am having a problem where the first address in a batch pulls in as blank and all subsequent addresses are for the previous invoice. Any thoughts?

    ReplyDelete
    Replies
    1. Yep Your probably using last occurrence as the data type in report writer instead of data.

      Delete
  2. I tried using this function with Global address but it gives an error. Any idea what function should I be using for Global fields?

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. I think I have created the fields correctly and added them to the check layout, however I am getting an error message, Error in equation 'Address line 1' How can I troubleshoot this error?

    ReplyDelete
  5. To avoid blank address lines in forms, ensure data validation. Implement mandatory fields and use placeholders to guide users. User-friendly design prompts complete information, preventing errors. How Play PUBG Additionally, regular checks and user testing refine the process, creating a seamless experience while reducing incomplete submissions.

    ReplyDelete