COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Crystal_Cognos on 13 Jul 2016 10:42:15 AM

Title: Report output format as XML
Post by: Crystal_Cognos on 13 Jul 2016 10:42:15 AM
When I tried run a report as xml format, the content is very less, not included every data. I may have less knowledge on XML format. Can anyone give some explanation or advice? Currently we have a request report output as XML for a customer invoice report.   
Title: Re: Report output format as XML
Post by: dougp on 13 Jul 2016 10:45:47 AM
XML is about data, not format.  I suspect you are getting the same results in CSV.  It's returning what's in the query, not what's on the page.
Title: Re: Report output format as XML
Post by: Crystal_Cognos on 13 Jul 2016 11:16:37 AM
Thanks. a report should have many data info, I only get this result when ran in XML, a summary line only.  :(

<?xml version="1.0" encoding="UTF-8"?>
-<dataset xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://developer.cognos.com/schemas/xmldata/1/">
<!-- <dataset xmlns="http://developer.cognos.com/schemas/xmldata/1/" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://developer.cognos.com/schemas/xmldata/1/ xmldata.xsd" > -->
-<metadata>
<item precision="77" scale="5" type="xs:decimal" name="Total Net"/>
<item precision="77" scale="5" type="xs:decimal" name="Total HST"/>
<item precision="77" scale="5" type="xs:decimal" name="Grand Total"/>
<item precision="22" scale="5" type="xs:decimal" name="Total Add-on"/>
</metadata>
-<data>
-<row>
<value>201.58</value>
<value>26.21</value>
<value>227.79</value>
<value>0</value>
</row>
</data>
</dataset>
Title: Re: Report output format as XML
Post by: MFGF on 14 Jul 2016 02:17:33 AM
Quote from: Crystal_Cognos on 13 Jul 2016 11:16:37 AM
Thanks. a report should have many data info, I only get this result when ran in XML, a summary line only.  :(

<?xml version="1.0" encoding="UTF-8"?>
-<dataset xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://developer.cognos.com/schemas/xmldata/1/">
<!-- <dataset xmlns="http://developer.cognos.com/schemas/xmldata/1/" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://developer.cognos.com/schemas/xmldata/1/ xmldata.xsd" > -->
-<metadata>
<item precision="77" scale="5" type="xs:decimal" name="Total Net"/>
<item precision="77" scale="5" type="xs:decimal" name="Total HST"/>
<item precision="77" scale="5" type="xs:decimal" name="Grand Total"/>
<item precision="22" scale="5" type="xs:decimal" name="Total Add-on"/>
</metadata>
-<data>
-<row>
<value>201.58</value>
<value>26.21</value>
<value>227.79</value>
<value>0</value>
</row>
</data>
</dataset>

What result do you get when you render as csv?

MF.
Title: Re: Report output format as XML
Post by: Crystal_Cognos on 14 Jul 2016 11:03:18 AM
I ran by csv also get  few amount of data. This report is little bit complicate, has multi tab when export in excel. maybe XML and CSV can't handle complicate result?
Title: Re: Report output format as XML
Post by: Crystal_Cognos on 14 Jul 2016 11:29:00 AM
I tried make the report only show one page,but there are more tables in one report layout, it's only show the first table data.