Wednesday 24 September 2014

SQL or MDX for an entire Report studio report

To see what is passed to the database when you run a report studio report view the SQL or MDX .

For DMR data sources only SQL is available not the MDX because in this case the data sources are relational.

Procedure

To view the SQL or MDX for the report,

 Tools menu--> Show Generated SQL/MDX

It will show the SQL or MDX that will be executed in the data source. The SQL or MDX is organized by query and by query result.

NOTE : If a query is used in more than one data container ,then for each data container a different query result is generated.

To view the SQL or MDX for a specific query, do the following:
  • Pause the pointer over the query explorer button  and click the query.
  • In the Properties pane, double-click the Generated SQL/MDX property.

The Generated SQL/MDX property shows the SQL or MDX that is executed when you view tabular data (from the Run menu, click View Tabular Data). Tabular data shows the part of data that is produced by the query in the form of a list.

Results


The SQL or MDX for the query appears in the Generated SQL/MDX dialog box. For SQL, you can choose to view native SQL, which is the SQL that is passed to the database when you execute the query, or Cognos® SQL, which is a generic form of SQL that IBM® Cognos Report Studio uses. 

 NOTE :Cognos SQL is converted to native SQL before the query is executed.

No comments:

Post a Comment