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 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
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
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
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
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156