web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Report Writer Calculated Field.

(0) ShareShare
ReportReport
Posted on by

Hello

 Would anyone be able to advice me on how to create a Calculated field on Report Writer to combine two Address lines.

For example I have columns Address1, Address2, Address3 in a table. In this case if I want to show Address1 and Address2 together in one calculated field, how do I write this calculated field

Address1 could be Los Angeles and Address2 could be California. Therefore, final result the calculated field should print is Los Angeles California.

much appreciated

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Justin Thorp Profile Picture
    2,265 on at

    Hi,

    When making the calculated field in Report Writer you want to make use of the "CAT" operator.  

    From the help:  CAT

    Joins the data in two fields with a string storage type into one string of characters. CAT stands for “concatenate,” and is symbolized by the pound (#) sign when displayed in an expression. You may want to use the CAT operator in conjunction with the STRIP function so that only the data in each field is displayed, and not empty blanks following the data.

    Thanks,

    Justin

  • Suggested answer
    Tim Foster Profile Picture
    8,515 on at

    See this article:

    intouchdynamicsgp.blogspot.ca/.../how-to-avoid-blank-address-lines-in.html

    Effectively you are providing all of the address data when you call the rw_selectAddrLine function and then select the line you want to print.

    This will give you a formatted address with no blank lines and a lot less effort.

    Tim

  • Verified answer
    Jeff451QL Profile Picture
    155 on at

    Below is another link that has an excellent explanation of the rw_SelectAddrLine Address Line function in Report Writer.

    http://dynamicsgpblogster.blogspot.com/2008/10/understanding-rwselectaddrline-address.html

    Jeff

  • Verified answer
    L Vail Profile Picture
    65,271 on at

    Hi,

    If you're just trying to get an address to look good, use the  rw_selectAddrLine  mentioned several times below. If you are actually needing a separate field that includes the concatenation of Address1 and Address2, follow Justin Thorp's answer. The rw_selectAddrLine is a great function, but it deals with the whole address block and does not yield a single calculated field that will combine the fields you referred to.

    If you will be using the CAT function, be sure to also CAT a comma and space if you desire one. The comma and space would be constant values that you would add to your calculated field.

    Kind regards,

    Leslie

  • Community Member Profile Picture
    on at

    I could do with CAT with a STRIP as I found on

    support.microsoft.com/.../866460

    for the problem I have at hand.

    I've  got my address lines sorted using   rw_selectAddrLine separately but these lines are printed in all Upper-case for some reason.

    Thanks everyone for all the replies.

    Cheers

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans