You can build a report by adding SQL or MDX
from an external source, such as another report.
If
you are working with MDX, you must be aware of the MDX syntax that IBM
Cognos Analytics - Reporting supports.
If
you edit the SQL of a query, you must change the Processing property
for that query to Limited Local.
You
cannot build a report by adding your own MDX if the data source is IBM Cognos TM1®. IBM Cognos TM1 does not support custom MDX.
Procedure
-
Create a new report and choose the Blank template.
-
Click the Queries icon , and click Queries.
-
Click the Toolbox icon and drag Query to the work area.
-
From the Toolbox, do one of the following:
- To build an SQL query, drag SQL to the right of the query.
- To build an MDX query, drag MDX to the right of the query.
Tip: You can drag SQL or MDX anywhere in the work area, and Cognos
Analytics - Reporting will automatically create a query.
-
Click the Show properties icon , and In the Properties pane, double-click the Data source property and click a data source.
- If required, set the Catalog property
to the name of the catalog.
- Double-click the SQL or MDX property
and type the SQL or MDX.
- Click Validate to check for errors.
-
If you are working with SQL, select the query, and in the Properties pane, set the Processing property to Limited Local.
- Double-click the query.
If the SQL or MDX
is valid, the data items defined in the SQL or MDX appear in the Data
Items pane.
-
Click the Pages, and click a report page.
-
Click the Toolbox icon and drag an object to the work area.
For example, drag a list, crosstab, chart, or repeater.
- Click the data container.
-
Click the Show properties icon, and In the Properties pane, click the Select ancestor icon and click the container you just created.
For example, if you created a list, click List.
Tip: You can also click the container selector (three orange dots) of the container to select it.
- Set the Query property to the query
for the report type.
-
Click the Insertable objects icon and then click the Data items tab
. Drag the items from the query you chose in the previous step to the data container.