COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Cognos Administration => Topic started by: Avisto.sbu on 10 Mar 2014 09:25:27 AM

Title: how to get the xml report files?
Post by: Avisto.sbu on 10 Mar 2014 09:25:27 AM
Hi,

I have to get the xml/html or the code source of the report files created?
Where can I get this code?
How can I get the code?
I tried to export from cognos administration but I get unreadable binary files with .dat extensions.

thanks for your answers
Title: Re: how to get the xml report files?
Post by: saumil287 on 10 Mar 2014 11:09:16 AM
Hi,
If you want the xml of the reports, you will get in the package1.xml file located under the export specification file.
This is the place where you get the xml source of the reports in a package.
check other xml files also.

Or you can install the sdk which has the samples code for jva and .net which you can use to customize or fetch the report xml specification


Regards
saumil
Title: Re: how to get the xml report files?
Post by: bdbits on 10 Mar 2014 11:26:23 AM
There are multiple ways to get at the report xml. The "best" way depends on what you want to do with it once you have it and whether you want to do this once or may times.  Since this is under admin, I am guessing it is not for development purposes. Is this for one-to-a-few or many reportst? One-time effort or on-going?

I assume you know you can copy the report xml to the clipboard from within Report Studio? This may be impractical if we are talking many reports, but it is one way.
Title: Re: how to get the xml report files?
Post by: moksha on 10 Mar 2014 11:43:49 AM
the best and most popular way is to copy the xml spscs from report studio to note pad
even if its meant large number of reports.
Title: Re: how to get the xml report files?
Post by: CognosPaul on 11 Mar 2014 09:16:53 AM
I've had a similar request. My solution was to use a vbscript to query the content store, and programmatically recreate the entire directory structure with all of the report XMLs. The solution (http://cognospaul.com/2014/03/11/export-report-xmls-file-system-updated/) works in SQL Server, unfortunately I don't have access to an Oracle environment to adapt the query.