Skip to main content

Dear community. In working on the Purchase Order layout in report designer I’ve noticed a difference between the formatting of the DELIVERY_ADDRESS and the POSTAL_ADDRESS fields. 

One is formatted line by line 

Street

City

State Post Code

Country

Where as the POSTAL_ADDRESS is set out as

Street, City, State Post Code, Country. 

However in the Company Address these are formatted the same, even if i place the same address ID in both fields on the PO the same address is displayed differently. Is there somewhere that the formatting of these fields is set?

Hi,

I found a similar issue that was reported in an earlier case. Below are the details.

In the standard layout provided in the core application, it has been implemented to use postal address in the page footer. According to further investigations and discussions, it was found that the postal address has been formatted to display maximum of six lines of the  address in the PO report.   This was done through the bug 46159 and the formatting was done using the strCase() function in a different block.

Ex. vldtstr:strCase(1,/tns:PURCHASE_ORDER_PRINT_REP_REQUEST/tns:PURCHASE_ORDER_PRINT_REP/tns:PO_HEADERS/tns:PO_HEADER/tns:POSTAL_ADDRESS)

Therefore the postal address is taken as a comma delimited list of strings and using the strCase() it will extracts and returns the one string per time. Having the Separator CHR(32) ||CHR(44) , it will add spaces and the commas in between the address lines. As in below examples,

<POSTAL_ADDRESS>Address1 ,Address2 ,CityState ,United Kingdom ,ZIP CODE ,GB</POSTAL_ADDRESS>

As given above, the system will identify the comma as a new line break. Also if we add a comma into an address line

i.e. Address1
Address2,
CityState
United Kingdom
ZIP CODE,
GB

and run the report it will identify the manually entered comma also as a new line break. Then it will give two line breaks and keep a blank space. Therefore, it will omit the last line of the address as it will only allow to display maximum six lines while having the separator.

XML: <POSTAL_ADDRESS>Address1 ,Address2, ,CityState ,United Kingdom ,ZIP CODE, ,GB</POSTAL_ADDRESS>

In the report it will display as follows:

i.e. Address1
Address2

CityState
United Kingdom
ZIP CODE

But, if we remove the separator and run the same test case it will display all the address lines and you can see it is more than six lines.

i.e. Address1
Address2

CityState
United Kingdom
ZIP CODE

GB

As you can see above there are eight lines in the address which violates the standard rule of allowing to display six lines of the address given in Address presentation.

Since the solution violates the standard rule given through the bug 46159, we cannot remove the separator from the code block. Additionally, the core requirement is to add the postal address as the footer. But the customer’s requirement is to add the postal address into the body of the report which cannot be seen as a generic requirement to be included into the standard layout. Therefore, if the customer still wants to add the postal address into the report header/body , then it has to be done through a customization to format the postal address to display into maximum six lines as done in the report footer using the above mentioned function.