POHeader.Calc_ShipToAddrList wrong

I’m trying to debug an issue where our company address is being printed wrong on Purchase Orders.

In a related thread (How are Data Definition "Calculated Fields" calculated?! - #18 by EpicorAnon) it is established that for calculated fields in a Report Data Definition the actually calculation cannot be seen or changed by the user. But when our Crystal Report tries to use POHeader.Calc_ShipToAddrList, instead of seeing it formatted as:

company_name~address~city_state_zip~country…

It is instead passing:

city~address~city_state_zip~country

Company configuration and company maintenance both show the correct company name, as does every other place I have seen. There is another slight weirdness - in the database, the city is actually stored with a comma after it, and while this comma shows up in the city_state_zip line, it does not show up in the first field where the name should be showing.

If this is an internally calculated field, I’m not even sure what we could have done wrong to get it messed up like this. How can I troubleshoot why this calculated field is passing the wrong company name?

I want to say I ran into this issue about a year ago. Epicor confirmed it was a bug, so you might want to submit a case to verify. I believe we ended up creating the address by looking up all of the individual fields in the Db.

As to how to debug a calculated field, to the best of my knowledge, you can’t. Perhaps someone else has some ideas, but I’ve always been told calculated fields can’t be viewed without the SDK.

It will be the address on the PO. This could be a plant address or other options. Is it possible that is the issue of which one it uses?
Also, you can set the address layout for certain items.

I looked at the Erp.Plant table and the “Name” field contained the wrong value, so it definitely was related to that. When I brought up Site Maintenance, the site name matched the wrong value, so I changed it there and saved. But when I created a new PO, suddenly the address fields were all completely empty even though the name was right. Apparently they were all blank in Site Maintenance as well, but for some reason it was filling them in from somewhere else correctly until I fixed the site name. After I filled in the address fields in Site Maintenance it appears to be populating correctly.