AM Console/WA - Print - print preview ends with error: FOR XML could not serialize the data
This article is about product releases
ALVAO Asset Management 11.0 and higher
Symptoms
This error occurs when printing all saved print templates, but only under certain circumstances.
After using the Print command and possibly confirming the "handing over and receiver" dialog, an error is displayed:
FOR XML could not serialize the data for node 'value' because it contains a character (0x...) which is not allowed in XML.
The reason why the error is displayed is as follows: In the asset registry, in the data (object names, property values, ...) there are stored characters that are not valid for XML documents. These characters are usually "invisible" and most often get there from HW detection (e.g. as strings stored in the serial number, etc.).
Cause
The cause is a bug in ALVAO products.
Solution
Fixed in release 11.1.1096 - 11.1 (2023-04-13)
Workaround
The alternative solution is to find an invalid character in the data in the database and manually correct the value. To find it, use the following query.
Note: an invalid character is defined at the beginning of the query. Replace it with the invalid character that appears in your error message (remove the excess 0 from the beginning of the character - e.g. 0x001F => 0x1F)
Query:
declare @invalidChar nvarchar=0x1F --replace with your invalid character code
select
n.intNodeId [NodeId],
n.txtPath [Path in tree],
n.txtName [Object name],
p.txtKind [Property name],
replace(p.txtValue,@invalidChar,'?') [Property value]
from tblNode n
join vPropertyKind p on p.lintNodeId=n.intNodeId
where p.txtValue like N'%'+@invalidChar+N'%'
Note: the query displays the "invisible" invalid character in the property value as "?".
Steps to reproduce this behavior
Attachments
Issue number
T132269ALVAO