on 05-22-2012 8:51 PM
We have this ongoing situation that has bubbled its way to the top and I need to find a way to solve it. Any suggestions would be appreciated.
Some of our customer's addresses require a 2nd street address line, but most require only 1 line for the street address. We have set up our USA address format so that we use the "block" field as the 2nd address line. The problem is that when the "block" field is blank, it leaves a blank line in the Address Block. Is there a way to collaspe the address when one of the fields is blank?
I am using SBO 8.81 PL 10. Most of my printed documents were built using Crystal Reports.
Randy Davis
Denver, CO
Hi Randy,
We had the same issue with our recently implemented 8.82. We also use ‘Block’ as the second address line.
Our consultant just added the following formula to the address boxes in the Crystal reports:
REPLACE({OINV.Address}, ChrW(13)+ChrW(13), ChrW(13))
It’ll still display a blank line if there is no Block field within SAP however will not print as long as you replace the two line breaks with just the
one as per above code.
Kind regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I hope you don't mind Greg I found your code very useful and I expanded it into a how-to article.
The updates link is located here. I still use this trick and it works great:
http://www.battleshipcobra.com/2013/sap-business-one-crystal-reports-address-fix/
Hi
You can create a formula like :
stringvar Address :="";
if (Not(ISNULL({tablename.field1})) AND {tablename.field1} <>"")
THEN Address : = {tablename.field1} + " " + CHRW(13);
if (Not(ISNULL({tablename.field2})) AND {tablename.field2} <>"")
THEN Address : = Address + {tablename.field2} + " " + CHRW(13);
if (Not(ISNULL({tablename.field3})) AND {tablename.field3} <>"")
THEN Address : = Address + {tablename.field3} + " " + CHRW(13);
if (Not(ISNULL({tablename.field4})) AND {tablename.field4} <>"")
THEN Address : = Address + {tablename.field4}
Address;
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pari, thank you for your reply.
I thought about writing a similar formula. However, we have several country formats and the resulting formula would be unmanageable.
I was hoping that SAP would have figured this out by now. Anyone else know of any other solution?
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.