COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: jamesluo on 22 Jun 2008 10:30:12 PM

Title: Question about Save report result in XML
Post by: jamesluo on 22 Jun 2008 10:30:12 PM
I have a report with two queries(such as two data lists),
after I run it and save the result in XML,
the xml file only contains  one query (one data list), why?

how could I save all the query data in report to XML?
Title: Re: Question about Save report result in XML
Post by: jahnavi on 22 Jun 2008 11:14:17 PM
Hi,

Open the reportstudio and open the required report and from tools click the option  open the data from clipboard and open the notepad  and then paste then the report data is copied to clipboard

Hope you can understand this
Title: Re: Question about Save report result in XML
Post by: larsonr on 23 Jun 2008 09:09:23 AM
Are you referring to saving the XML spec of the query you created or the returned dataset?

If you want the XML spec, the clipboard option is handy.  Cognos does offer another option using their Local File Access option.  Check the Administration guide on how to set it up if you would like to use it.

If its the dataset, are you getting data back when you view the tabular data? If not, this may explain why only one is coming back instead of both.
Title: Re: Question about Save report result in XML
Post by: rockytopmark on 23 Jun 2008 10:31:00 AM
With CSV and XML output, you will only get one query based object's rows back... just a nature of the beast.  If you have 2 Crosstabs, or 2 lists, you will not get both sets of rows, only the first.

Think of the CSV, or the XML file as a data "Table."  It can have only one definition (Structure, Columns, etc...) and this is the primary reason for why 2 distinct recordsets can't be output into one XML or CSV data file.
Title: Re: Question about Save report result in XML
Post by: jamesluo on 23 Jun 2008 08:34:32 PM
thanks for all of your quick reply. rockytopmark addressed my question exactly. thanks.