To use IBM Cognos product documentation, you must enable JavaScript in your browser.

Creating a Basic Report

Creating a basic report involves

      

specifying the data package

      

choosing a basic report layout

      

adding data

      

inserting a single data item

      

validating the report

      

saving the report

      

running the report

      

setting PDF page options

You can then lay out the report and manipulate the data that will appear in the report. For information about other tasks that are specific to a report type, see Lists, Crosstabs, Charts, and Maps.

Specify the Data Package

Specify the package that will provide items for the report.

The packages that you use to generate reports are based on models that are created in the modeling tool, Framework Manager. A model is a set of related objects, such as query subjects, dimensions, filters, and calculations. When you open a package in IBM Cognos 8, these model objects are visible in the left frame.

The package must be previously created and published to the IBM Cognos Connection portal. For more information, see the Framework Manager User Guide.

Steps
  1. Open Report Studio with the package you want to use.

  2. In the Welcome dialog box, choose whether to open a new or existing report or template:

Objects from the selected package, such as query items, appear on the Source tab of the Insertable Objects pane.

Tip: You can later change packages .

Refresh the Package

If the package that a report is using has changed, refresh it to ensure that you are working with the latest version.

Steps
  1. In the Insertable Objects pane, click the Source tab .

  2. Right-click in the Source tab and click Refresh.

Tip: You can also close and reopen the report to upgrade it to the latest version of the package.

Choose a Basic Report Layout

Report Studio includes several basic report layouts that include report objects, such as lists, crosstabs, maps, repeaters, and headers and footers. You can also choose to start with a blank report or open an existing report.

Tip: The Budget vs. Actual sample report in the GO Data Warehouse (analysis) package is based on a basic report layout. For more information about The Great Outdoors Company samples, see Sample Reports and Packages.

Steps
  1. From the File menu, click New .

  2. If you want to change the package, click the ellipsis (...) button and click a different package.

  3. Choose a basic report layout:

The basic report layout appears in the report page.

Add Data

Select the data items you want to appear in your report.

For more information about adding data to a relational style report, see Add Relational Data to a Report. For more information about adding data to a dimensional style report, see Add Dimensional Data to a Report.

Data Source Icons

Each object in the data source has a representative icon. You can insert all of the following objects in a report, except for packages and dimensions.

Icon

Object

 

Package, which contains the objects you can insert in a report.

 

Namespace, used to organize objects.

 

Query subject, which represents a table in the database.

 

In relational data sources, query item, which represents a column of qualitative data in the database, such as product name or country.

In dimensional data sources, level attribute, which represents a property of a level.

 

A member is a unique item within a hierarchy. For example, Camping Equipment and 4 Man tent are members of the Products Hierarchy.

 

Dimension, which represents a broad grouping of descriptive data about a major aspect of a business, such as products, dates, or markets.

 

Hierarchy, which represents a collection of dimensional members organized into a tree structure.

 

Level, which is a set of members that have common attributes. For example, a geographical dimension might contain levels for country, region, and city.

Multiple levels can exist within a level hierarchy, beginning with the root level. The root level is the parent and rollup of all members in the first level. It is used to obtain a rollup of all values across the hierarchy and to provide a convenient point to start drilling.

For example, a Years level hierarchy may contain the following levels:

 

Measure or fact, a query item that represents a column of quantitative data in the database, such as revenue or quantity.

 

Measures folder, which contains hierarchical measures.

 

Model filter.

 

Folder, used to organize data items. You cannot import a folder into your report.

Step

Insert a Single Data Item

You can insert a single data item anywhere in your report using the singleton object. The singleton object retrieves only the first row value for that query. Inserting a single data item is useful when you want to show a value that is independent from the rest of the values in the report or when you want to insert some boilerplate text, such as a company name and address. For example, you can add the total revenue value in the header of each page in a report.

You can associate multiple singleton objects with a single query in relational reporting and dimensional reporting to optimize performance, such as when all the data items in the singleton are from the same database table. In addition, two or more singletons can reference data items from the same query. This is useful when using a single query is more efficient to display a set of single values than using multiple queries.

You can also filter the data item in the singleton. For example, you can show the total revenue for only the year 2007.

Queries that are associated to a singleton object are not supported when producing report output in delimited text (CSV) format.

Tip: The Returns by Damage, Failed Orders and Complaints in 2006 sample report in the GO Data Warehouse (analysis) package includes a singleton. For more information about The Great Outdoors Company samples, see Sample Reports and Packages.

Steps
  1. In the Insertable Objects pane, on the Toolbox tab , drag Singleton to the report.

    An empty data container is created.

  2. From the Insertable Objects pane, on the Source tab , drag a data item into the Singleton container.

  3. To change the query associated to the singleton object, in the Properties pane, double-click the Query property and make changes.

When the report is run, the first row value for the data item is retrieved.

Validate a Report

Validate your report to ensure that it contains no errors.

When you open a report created in a previous version of IBM Cognos 8, it is automatically upgraded and validated. For more information, see Upgrading Reports.

Steps
  1. From the Tools menu, click Validate Report .

    A message box appears indicating whether any errors were found in the report.

  2. If you require more detail from the validation process, from the Tools menu, click Validate Options and do the following:

  3. If you encounter validation errors and want Report Studio to identify incorrect objects in your report, from the Tools menu, click Auto Correct.

    Report Studio provides a list of such objects that you can remove individually to successfully run your report.

    In some cases, the information or error message is linked to the location of the issue in your report. To go to the location of the issue, click the message, and then click Select. If only warnings and information appear in the dialog box, these will disappear when you click OK.

Save a Report

Save your report to preserve the modifications you made.

Reports are saved to the IBM Cognos 8 server. You can also save your report on your computer .

Steps
  1. From the File menu, click Save  or click Save As to save a copy of the report under a different name.

  2. If you are saving the report for the first time, specify where to save the report and type a file name.

    For information about setting up folders in IBM Cognos Connection for your reports, see the IBM Cognos Connection User Guide.

  3. Click Save.

Run a Report

Run your report to see the data that is retrieved. Save time by validating it first to check for errors.

You can also run a report or a group of reports in IBM Cognos Connection. Furthermore, you can save report outputs to a file system. For more information, see the Administration and Security Guide.

You can specify not to render a report page if it does not contain any data .

If you run a report that uses functions or features not supported by the data source, an error message appears. We recommend that you periodically test your reports while you author them in Report Studio to ensure that you do not encounter multiple error messages when you run the report.

Steps
  1. Open a report.

  2. If you want to clear parameter values stored on the IBM Cognos 8 server, from the File menu, click Clear Parameter Values.

    Parameter values stored by the IBM Cognos 8 server include signon, validation, and prompt information. For example, if you define two data source connections in IBM Cognos Connection that point to the same data source, you are prompted to choose one when you run a report. This information is stored so that you are not prompted each time you run the report.

  3. If you want to view only the tabular data, from the Run menu, click View Tabular Data .

    If the report contains multiple queries, you must first click an object, such as a list or crosstab, that uses the query for which you want to view the tabular data.

    Use this command to ensure that the right results appear. For example, you create a calculation and you want to ensure it is giving you the results you want.

    Tip: You can also view tabular data in Query Explorer, which is useful when you are building queries.

  4. If you want to set run options, from the Run menu, click Run Options.

    The default value is the value of the selected corresponding run option in IBM Cognos Connection.

    The run options that you set apply only to the current session. When you close Report Studio, the options return to the default settings.

  5. Change any values for the current session.

    Option

    Notes

    Format

    Specify to change the default format from HTML.

    Paper size

    Specify only if the output format is PDF.

    Paper orientation

    Specify only if the output format is PDF.

    Data mode

    Specify how much data is returned:

    • All Data returns all data.

    • Limited Data limits the amount of data returned based on design mode filters defined in the package.

    • No Data returns artificial data instead of actual data from the data source.

    For more information about design mode filters, see the Framework Manager User Guide.

    Language

    The content language sets the preferred language for the data, Cognos Viewer, dates, and so on.

    Rows per page

    Specifies the number of rows to appear on each page.

    A Rows Per Page property exists in the Properties pane for lists and crosstabs. If you set this property, the setting overrides the same-named run option. This property applies to both HTML and PDF outputs. For more information about this property, see Controlling the Rows Per Page for Multiple Containers in HTML and PDF.

    Prompt

    Select to be prompted for each prompt defined unless the prompt is defined in a report page.

    If you clear the Prompt check box, you are prompted only if the report cannot run without user intervention. For example, if a report has a single parameterized filter that is optional, you are not prompted when you run the report.

  6. From the Run menu, click one of the options to produce the report in the format you want.

    You can produce a report in HTML, PDF, CSV, various Excel formats, and XML. You cannot produce a report in CSV format if you have more than one query defined in the report unless the additional queries are used for prompts.

The report runs in Cognos Viewer. Once the report has finished running, you can run the report again in the same format or in a different format. If you run the report again in CSV or XLS format, the report will appear in a new browser window.

The options available in Cognos Viewer depend on the capabilities set by the administrator for each user. For more information, see the Administration and Security Guide.

Running a Report Against a Dimensional Data Source

You can cancel a report that is running against Microsoft SQL Server Analysis Services only during the initial portion of its execution. After this time, the report runs to completion.

The same behavior applies to SAP BW data sources.

In Framework Manager, you can also control the number of levels within a hierarchy from which members, or values, are extracted from the hierarchy to populate a tree prompt.

For SAP BW, you can reduce the number of hierarchy levels to limit the number of nodes by setting the SAP BW variable property trimHierarchyLevels to 1. This removes the lowest level from the hierarchy prior to creating the list of nodes.

Units of Measure Notation

When running a report against an SAP BW data source, units of measure are included in the same column as the data values, separated by one space. For example, Celsius and Fahrenheit notations are appended to the end of the value.

If you see an asterisk character (*), one of the following was detected:

This behavior occurs when you are using an IBM Cognos cube as a data source.

This behavior also occurs for SAP BW data sources.

Unsupported SAP Variable Properties

The following SAP variable properties are not supported:

When using Business Explorer (BEx) to define variables in your SAP data source, avoid using exclusionary ranges and the mandatory not initial property.

Specify Not to Render a Page If It Does Not Contain Data

You can specify not to render a report page if the page does not contain any data when the report is run.

Steps
  1. In the report page, click a data container.

  2. In the Properties pane, click the select ancestor button  and click the data container type.

    For example, if the data container is a list, click List.

  3. Set the Render Page when Empty property to No.

  4. Repeat steps 1 to 3 for all other data containers in the page and any table of contents objects .

When you run the report, if no data is produced in all data containers and table of contents objects in a page, the page is not rendered. The page is not rendered even if the page contains other objects, such as text items or images.

Controlling the Rows Per Page for Multiple Containers in HTML and PDF

If you have more than one data container in a report, such as a list and a crosstab, you can control how the report is rendered in HTML and PDF by setting the Rows Per Page property for each container.

For HTML output, the report property option Page break by data container for interactive HTML controls whether the default number of rows is rendered for each data container on each page.

IBM Cognos 8 uses the following rules when rendering reports in HTML and PDF:

Producing a Report in CSV Format

IBM Cognos 8 can produce reports in CSV format so you can open them in other applications, such as Microsoft Excel. Reports saved in CSV format

You can open reports saved in CSV format using Microsoft Excel, Microsoft Windows Wordpad, and Star Office. By default, reports produced in CSV format will appear in the application associated with the .csv file type.

You cannot produce the following in CSV format:

In IBM Cognos Connection, you can configure the CSV output to suit your environment. For example, you can specify the character used to delimit fields. For more information, see the Administration and Security Guide.

Producing a Report in Excel Format

IBM Cognos 8 can produce reports in Excel format. Three options are available:

The Excel 2000 format can be viewed with versions of Excel 2000 and later. It supports up to 65,536 rows and multiple sheets. The Excel 2000 format is only available in IBM Cognos 8 when IBM Cognos Application Firewall validation is disabled.

Excel 2000 single sheet format offers improved security. Excel 2000 may have cookies in the URLs to spreadsheets, which could be used to illegally impersonate a user. Excel 2000 single sheet format does not use outgoing URLs. However, there is a limit of 65,536 rows, and page breaks for multiple-author pages are ignored.

Excel 2002 format and Excel 2000 single sheet format also offer the following benefits:

The IBM Cognos 8 full date format does not always appear correctly in Microsoft Excel 2000 if it is on a system with a regional setting other than English. This does not occur with Microsoft Excel 2002 or 2003 versions. To fix this, reapply the proper format in Excel.

Excel 2007 format renders report output in native Excel XML format, also known as XLSX, that provides a fast way to deliver native Excel spreadsheets to Microsoft Excel 2002, Microsoft Excel 2003, and Microsoft Excel 2007. Users of Microsoft Excel 2002 and Microsoft Excel 2003 must install the Microsoft Office Compatibility Pack, which provides file open and save capabilities for the new format. The output is similar to other Excel formats, with the following exceptions:

Limitations exist when producing reports in XLS format. For more information, see Limitations When Producing Reports in Microsoft Excel Format.

Producing a Report in XML Format

XML report outputs save the report data in a format that conforms to an internal schema, xmldata.xsd. You can find this schema file in c8_location/bin.

This format consists of a dataset element, which contains a metadata element and a data element. The metadata element contains the data item information in item elements. The data element contains all the row and value elements.

You can create models from reports and other data that conform to the xmldata.xsd schema. This is useful if you want to use a report as a data source for another report, or if you use a database that cannot be read by Framework Manager. In this case, export the data from the data source to an XML file, in conformance with the xmldata schema, and then open the XML file in Framework Manager.

For more information, see the Framework Manager User Guide.

You cannot produce the following in XML format:

Set PDF Page Options

Set PDF page options to control how report pages appear in PDF. You can set PDF page options for individual report pages or for all report pages in a layout .

Tip: The PDF Page Properties sample report in the GO Sales (analysis) package includes PDF page options. For more information about The Great Outdoors Company samples, see Sample Reports and Packages.

You can also set PDF page options in IBM Cognos Connection. For more information, see the IBM Cognos Connection User Guide.

Steps
  1. To set PDF page options for all report pages in a layout, do the following:

  2. To set PDF page options for an individual page, do the following: