The first time I encountered this particular ConfigMgr reporting error, I figured it was an anomaly. It took a little digging, but I did find others who had encountered it and worked through it on the TechNet forums here and here. Having now seen (and fixed) this error multiple times at the same customer in short order though, hopefully I can save some time and headaches for others who encounter it by sharing the experience here.
Issue: Running an out-of-the-box SSRS report from ConfigMgr 2012, an error is generated regarding a problem with the XML document:
There is an error in XML document (1, 613245). ‘ ‘, hexadecimal value 0x0C, is an invalid character. Line 1, position 613245.
A similar error may be generated when running the report from the ConfigMgr console.
Cause: In processing inventory data from client machines, a non-standard character was included in the data (either as part of the original value on the client machine or through corrpution of the data). When retrieving the data from the ConfigMgr database to populate the value fields in the report, the invalid character generates an error.
Resolution: The most effective way to resolve this issue is to remove the database record containing the invalid character.
Disclaimer: Do not attempt to modify the ConfigMgr database without first ensuring a proper backup. Note that any changes you make may not be supported by Microsoft.
The invalid character in question is most easily identified by clicking on the Details button in the Report Viewer error dialog. In particular, we’re looking for the line matching the error text as it contains the character. We are given the value of the ASCII character (0x0C in hex or 12 in decimal in this example) in the error, but for our purposes it will be easier to copy the character itself from the error details.
For now we’ll copy it into Notepad as we’ll need to refer back to it in a second.
Next, we need to go into SQL Management Studio and open up a new query window for the ConfigMgr database. Because we were looking at a report for inventory data related to Add/Remove Programs (ie, Programs and Features), we’ll query the v_Add_Remove_Programs view to find the offending record using a query similar to the following:
<span style="font-family: 'Arial Unicode MS'; font-size: xx-small;"><span style="font-family: 'Arial Unicode MS'; font-size: small;">SELECT DISTINCT sys.Netbios_Name0, sys.DisplayName0 FROM v_R_System sys JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID WHERE DisplayName0 like '%♀%'</span></span>
In this case, we copied the target character…♀…from the error details, in single quotes right before the hex code:
Copying and pasting this into the query between the wildcards, we should be able to see the record(s) causing our problem.
Now we simply use a short query to delete the problem record:
DELETE FROM Add_Remove_Programs_DATA WHERE DisplayName00 like '%<span style="font-size: small;">♀</span>%'
Once the offending record has been removed, we should now be able to run our reports normally. It should be noted however that if the problem was the result of bad data in the client machine registry, it is likely to reappear following the next inventory cycle. In that case, the client machine will need to be tracked down and have the bad data removed.