Example - Create a Report

Use IBM® Cognos® Report Studio to create reports with complex layout, formatting, and report user interactions. Such reports are usually created by professional report authors who have a good knowledge of the data and tools.

In this exercise, you will learn how to:

  • Create a chart
  • Make the report interactive with prompts

You are a business analyst for the Sample Outdoors Company. You create a chart report in Report Studio to show the performance of returns over the last few years. You make the report interactive by adding a prompt.

You will create a report that looks like the Report Studio sample Returns by Order Method - Prompted Chart in the GO Data Warehouse (analysis) sample package.

To perform this exercise, you must have the appropriate licensing and security permissions for this functionality.

Things to notice:

  • When you use Report Studio, data is not live. You must run the report to view data.
  • You can view the XML report specification.
  • You can add multilingual capabilities.

Procedure

  1. Open IBM Cognos Connection:
    1. Start your Web browser.
    2. In the address bar, type the URL supplied by your administrator, and then press Enter. The URL looks something like this: http://servername/cognos
  2. In the IBM Cognos Welcome page, click Author advanced reports to open Report Studio.
  3. Click Samples, Models, GO Data Warehouse (analysis).
  4. Click Create new, click Crosstab, and click OK.
  5. Insert data in the crosstab zones:
    1. In the Source pane, expand Sales and Marketing (analysis), Returned items, Return reason, and Return reason. Drag Reason description to the Columns zone.
    2. Under Returned items, expand Returned items. Drag Return quantity to the Measures zone.
    3. Under Returned items, expand Products, and Products. Drag Product line to the Rows zone.
    A crosstab with three columns and three rows.
  6. Click Run Report Run Report icon to run your report and verify the content.

    The report output appears in IBM Cognos Viewer.

    Tip: To return to Report Studio, close the IBM Cognos Viewer Web browser.

    An example of the return quantity report in Cognos Viewer.
  7. Insert another column in the report:
    1. In the Source pane, expand Sales and Marketing (analysis), Returned items, Time, and Time.
    2. Drag Year to the column after the Reason description column.
  8. Insert a chart in the report:
    1. In the Source pane, click the Toolbox tab.
    2. Drag the Chart object below the crosstab.
    3. When the Insert Chart window opens, click the Column chart type.
    4. Select Fill with data from and click OK. The data from the crosstab is automatically added to the chart.
    5. Click the chart to select it.
    6. In the Properties pane, under Data properties, select the Query property. Select Query1 from the list. Tip: When you change the Query property to the query that you used for the crosstab, it becomes easier to find and reuse the same data items for the chart.
    An example of the return quantity crosstab and bar chart.
  9. Create a filter to exclude the Wrong product ordered return reason from the crosstab:
    1. In the crosstab, click the Reason description column heading.
    2. On the toolbar, click the arrow next to the Filter icon Filter icon, and click Create Custom Filter.
    3. Under Condition, select Do NOT show the following values.
    4. Under Values, select Wrong product ordered and move it to the Selected values list.
    5. Click OK.
  10. Create a prompt page for the order method to allow users to filter data in the report and retrieve data only for the order method they select:
    1. Click the background of the work area to clear.
    2. From the Tools menu, click Build Prompt Page.
    3. Use Ctrl+click to select the Back and Next buttons, and the Double click to edit text prompt page title (that are automatically created) and delete them.
    4. In the Source pane, click the Toolbox tab.
    5. Drag the Value Prompt object into the prompt page.

      The Prompt Wizard - Value Prompt window opens.

    6. Click Next.
    7. Beside the Package item box, click the ellipsis (...) button.
    8. When the Choose Package Item window opens, expand Sales and Marketing (analysis), Returned items, Order method, and Order method.
    9. Click the Order method type dimension, and then click OK.
    10. Click Next to accept the defaults, and click Finish.
  11. Pause the pointer over the Page Explorer button Page Explorer icon on the Explorer bar. In Report Pages, click Page1 to return to the report page.

    Tip: Click the Prompt Pages folder title to remove or rename a page, or to edit properties.

    A screen capture of the Source pane and the work area showing the cursor over the Page Explorer.
  12. Add a title to the report:
    1. Double-click the Double click to edit text title area, type Returns by Order Method, and click OK.
  13. Save the report:
    1. From the File menu, click Save As.
    2. Name the report Returns by Order Method - Prompted Chart and click Save.
  14. Run your report and verify the content:
    1. Click the run report button.
    2. In the Order method drop-down list, click E-mail and then click Finish.

    The report output appears in IBM Cognos Viewer.

    A screen capture of the Returns by Order Method report as it appears in Cognos Viewer.

Example

Try on your own:

  • Save the report as a template so you can create reports with the same layout and include different data.

    Tip: From the File menu, click Convert to Template and then save the report with a new name.

  • Change the chart background color.

    Tip: In the work area, click the chart. In the Properties pane, expand Color & Background, click Background Color, and click the ellipsis (...) button next to Background Color.

  • View the XML specification for the report.

    Tip: From the Tools menu, click Show Specification.

What to do next

For information about using Report Studio, see the IBM Cognos Report Studio User Guide.