COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: RAJESH_COGNOS on 26 May 2009 06:55:16 AM

Title: Can we see a Query behind the report in report studio?
Post by: RAJESH_COGNOS on 26 May 2009 06:55:16 AM
Can we see a Query behind the report in report studio? if yes where?
Title: Re: Can we see a Query behind the report in report studio?
Post by: Gollapudi on 26 May 2009 07:06:36 AM
What kind of Query you wanna See..
Title: Re: Can we see a Query behind the report in report studio?
Post by: RAJESH_COGNOS on 26 May 2009 07:39:25 AM
The query that formed after all the necessary columns are added to the report.
Title: Re: Can we see a Query behind the report in report studio?
Post by: dumbell on 26 May 2009 08:46:03 AM
Make sure you are in the query explorer.Select the Query of your interest. Under properties of the Query, below Data sub heading, you will see "Generated SQL/MDX". Select that and you will see sql generated in Native as well as in Cognos version.

If you are asking for the sql for whole report. It is thru Menu item, "Tools" and "Generated SQL/MDX"

Hope this helps.

Dumbell
Title: Re: Can we see a Query behind the report in report studio?
Post by: blom0344 on 27 May 2009 03:00:22 PM
If you REALLY want to determine what happens 'underneath' then I'd suggest running a trace on the database that is queried. It is very informative as the proposed query that can be seen in Report Studio (Generated SQL/MDX) is often just a kind of 'scenario' . The actual SQL executed within the database is quite often a set of queries that Cognos recombines on the server. 
I realise that this is probably beyond the average capabilities of a report writer, but a DBA may be persuaded to help in this.
The benefit is that the traced statements are often easier to read than the Cognos scenario..