Thursday, November 24, 2011

Repeating first item in XMLP reports

n an XMLP report, I was finding that the first item (first data entry) was being repeated in the report. The remainder of the items in the report were displaying as expected. After some investigation, a colleague pointed out that this was caused by the root element and data tags having the same value:

For example:

 <?xml version='1.0'?> <DATA> <DATA> </DATA> </DATA>

The key is that the tag <DATA> is both the root level element and the tag used by the data elements.

The XML format actually required is this:

 <?xml version='1.0'?> <ROOT_ELEMENT> <DATA> </DATA> </ROOT_ELEMENT>

What was causing the issue in this case was the XML file layout field tag. This is set in the file layout properties in the use tab. There is a field there called File Definition Tag. This is where you set the root element tag:

Picture (Device Independent Bitmap)       

Full article here.

0 comments: