Site/Warehouse data missing on a Sales Invoice

Hello!

For some reason the InventSite and InventLocation fields are printing blank on our Sales Invoice forms:

Any advice on what I may have wrong here? Thank you!

The binding seems to be correct, but there is no information - the attributes you mention are just empty strings - in the DDSP file you attached, and therefore you will not see it on the printed report.

May I first ask whether this has worked once or whether you have perhaps recently included these fields in the report?

Here is the highlighted section where we are finding this info in the DDSP.

image

Yes, this used to function for us, but I cannot confirm when it began failing. Thanks!

Thank you for pointing me in the right direction. Actually, all the information is already included inside the InventDimPrint attribute:

… while InventLocationId and InventSiteId attributes are empty.

With the current DDSP, it is possible to have this information from InventDimPrint (below marked 1 and 2) either printed as a whole, or you can also try to isolate the information for Site and Warehouse from it by using a combination of the substring-before and substring-after functions (3):​

substring-before(substring-after(InventDim/@InventDimPrint,'Site : '),'Warehouse : ')

This Xpath expression will return the information for Site. For Warehouse, you can use the following expression:

substring-after(InventDim/@InventDimPrint,'Warehouse : ')

However, you will see already in the first invoice line that this is not a robust solution. Here, for some reason, all the information is repeated twice:

Therefore I would advise you to customize the DSP class for this report in a way that the data for Site and Warehouse would be mapped to separate attributes and not concatenated as parts of the same attribute as now.