When you create a report, you are actually creating a report specification. The report specification defines the queries and prompts that are used to retrieve data, as well as the layouts and styles used to present the data. For simplicity, the report specification is named the report.
Before creating a report, ensure that you have the planning
information you need.
![]() | |
![]() | |
![]() | |
![]() | |
![]() |
You can then format 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 Types of Reports.
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 Cognos 8, these model objects are visible in the left frame.
The package must be previously created and published to the Cognos Connection portal. For more information, see the Framework Manager User Guide.
In the Cognos Connection Welcome page, click the Launch link.
From the drop-down list, click Report Studio.
In the Select a package dialog box, click the package you want to use.
In the Welcome dialog box, choose whether to open a new or existing report or template:
To create a new report or template, click Create a new report or template and choose a report template.
Tip: You can specify a language other than the default language for your package by clicking on the ellipsis (...) button to the right of the Package field, clicking the Language ellipsis button in the Report Package dialog box, highlighting the desired language, and then clicking OK. As stated on the language selection dialog, items such as separators and decimals may need to be manually updated for language-specific syntax rules as a result of your selection.
To open an existing report or template, click Open an existing report or template and select a report.
Objects from the selected package, such as data items, appear on the Source tab of the Insertable Objects pane.
Tip: You can later change packages .
If the package that a report is using has changed, refresh it to ensure that you are working with the latest version.
In the Insertable Objects pane, click
the Source tab .
Right-click its background and click Refresh.
Tip: You can also close and reopen the report to upgrade it to the latest version of the package.
When creating a new report, choose a report template
to get you started quickly. You can select a predefined template
that is formatted as a particular report type ,
or you can open an existing report as a template.
From the File menu, click New .
If you want to change the package, click the ellipsis (...) button and click a different package.
Choose a report template:
To create a report using one of Report Studio’s predefined templates, double-click the template you want.
Tip: Double-click Report Template to create a report template that can be applied to reports created in Query Studio or Analysis Studio.
To create a report using a previously created template, double-click Existing, locate the template, and click Open.
Tip: Click the Type box and then click Templates to see only existing templates.
To open an existing report as a template, double-click Existing, locate the report, and click Open. You are actually opening a copy of the report, and the original report remains unchanged.
The report template appears in the report page. For more information about templates, see Creating Your Own Report Templates.
Select the data items that you want to appear in the report.
If you frequently use items from different query subjects or dimensions in the same reports, ask your modeler to organize these items into a folder or model query subject and then to republish the relevant package. For example, if you use the product code item in sales reports, the modeler can create a folder that contains the product code item and the sales items you need.
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. |
| 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. |
| A folder is used to organize data items. You cannot import a folder into your report. |
In the Insertable Objects pane, on
the Source tab ,
drag each data item to the location where you want it to appear.
A flashing black bar indicates where you can drop an item.
Items inserted in the report appear on the Data Items tab .
For more information about a data item, right-click the item and click Properties. For example, when working with relational data sources, the Usage property identifies the intended use for the data represented by the data item.
Other ways to select data items are to double-click each item, or right-click each item and click Insert.
If you want to remove a data item from the report, select
it and click the delete button .
To remove the data item from the report but keep it on the Data
Items tab, click the cut button instead.
When using dimensional data, you can customize how you see data in the source tree. You can select a metadata view with dimensions, hierarchies, levels, an optional members folder, and member properties.
Or you can select a members-oriented tree view, such as the one in Analysis Studio. This view allows you to add only members in your report.
In the Insertable Objects pane, click
the Source tab .
Right-click anywhere in the pane and click Package Tree Settings.
Select the options that you want and click OK.
Save your report to preserve the modifications you made.
Reports are saved to the Cognos 8 server. You can also
save your report on your computer .
From the File menu, click Save , or click Save As to
save a copy of the report under a different name.
If you are saving the report for the first time, specify where you want to save the report and type a file name.
For information about setting up folders in Cognos Connection for your reports, see the Cognos Connection User Guide.
Click Save.
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 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.
Open the report that you want.
If you want to clear parameters values stored on the Cognos 8 server, from the File menu, click Clear Parameter Values.
Parameter values stored by the Cognos 8 server include signon, validation, and prompt information. For example, if you define two data source connections in Cognos Connection that point to the same data source, you will be prompted to choose one when you run a report. This information is stored so that you will not be prompted each time you run the report.
From the Tools menu, click Validate
Report .
A message box appears indicating whether any errors were found in the report.
If you require more detail from the validation process, revalidate the report by clicking Validate with Options, and do the following:
Click one of the following validation levels.
Validation level | Description |
Error | Retrieves all errors returned from the query. |
Warning | Retrieves all errors and warnings returned from the query. |
Key Transformation | In addition to errors and warnings, retrieves informational messages describing important transformation steps from the report specification to the native query sent to the data source. These messages can be helpful to understand the cause of errors and warnings returned from the query. |
Information | Retrieves errors, warnings, key transformations, and other information related to query planning and execution. |
Select the Interactive Data check box to specify that no query optimization is to be used.
The Interactive Data check box controls how queries will be processed during validation.
Clear the Interactive Data check box to set the Execution Optimization property to All Rows.
Tip: For more information about the Execution Optimization property, see Execution Optimization in Report Studio Object and Property Reference.
A message box appears indicating whether any errors were found in the report.
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, each of which you can then remove to successfully run your report.
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.
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 Cognos Connection.
The run options you set apply only to the current session. When you close Report Studio, the options return to the default settings.
Change any values you want for the current session and click OK.
Option | Notes |
Format | None. |
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 specify a value for this property, it 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 If you clear the 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. |
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 or XML 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.
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.
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:
an unknown currency
a value of unknown or questionable unit of measure, such as a mixed currency calculation or rollup
Mixed currency values occur when you calculate values with different currencies.
This behavior occurs when you are using a Cognos cube as a data source.
This behavior also occurs for SAP BW data sources.
Some SAP variable properties are not supported.
Exclusionary ranges appear as an inclusionary prompt.
Mandatory not initial appear as a mandatory prompt.
When using BEx to define variables in your SAP data source, avoid using exclusionary ranges and the mandatory not initial property.
You can specify not to render a report page if the page does not contain any data when the report is run.
In the report page, click a data container.
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.
Set the Render Page when Empty property to No.
Repeat steps 1 to 3 for all other data containers in the
page as well as 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.
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.
Cognos 8 uses the following rules when rendering reports in HTML and PDF:
If the Rows Per Page property is not set for any of the data containers, 20 rows per page are rendered in HTML and each page is completely filled in PDF. The first data container is rendered until there is no more data, followed by the next container, and so on.
Tip: The number of rows that appear on a PDF page depends on the font size set in the report.
If the Rows Per Page property is set for each data container, the specified numbers of rows are rendered in HTML and PDF on each page until there is no more data.
If the property is set for only some of the containers, the specified numbers of rows are rendered in HTML and PDF on each page until there is no more data. For the remaining containers, 20 rows per page are rendered on each page in HTML and each page is completely filled in PDF.
For example, you have two lists, List1 and List2. You set the Rows Per Page property to 5 for List1. When you run the report in HTML, the first page contains the first 5 rows from List1 followed by the first 15 rows of List2.
If no data is returned for a data container, an empty container is rendered.
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
are designed to support Unicode data across many client operating systems
are UTF-16 Little Endian data encoded
include a BOM (Byte Order Mark) at the beginning of the file
are tab-delimited
do not enclose strings in quotation marks
use a new line character to delimit rows
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:
maps
charts that do not have at least one category or series
reports that have more than one query defined in the report, unless the additional queries are used for prompts.
In 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.
Cognos 8 can produce reports in Excel format. Three options are available:
Excel 2000 Single Sheet will produce reports on one sheet that you can view in Microsoft Excel versions earlier than 2002.
Excel 2002 will produce reports that you can view in Microsoft Excel versions earlier than 2007.
Excel 2007 will produce reports that you can view in Microsoft Excel version 2007.
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 Cognos 8 when 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:
Both work with SSL protocol.
Both work with a single signon.
Secure reports can be accessed without subsequent signons because the system automatically identifies users and provides security information.
Both work with Netscape 7.01.
Spreadsheets are contained in a single file for reliable spreadsheet navigation.
The 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 XP, Microsoft Excel 2003, and Microsoft Excel 2007. Users of Microsoft Excel XP 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:
Charts are rendered as static images.
Row height can change in the rendered report to achieve greater fidelity.
Limitations exist when producing reports in XLS format. For more information, see Producing Reports in Microsoft Excel 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:
maps
charts that do not have at least one category or series
reports that have more than one query defined in the report, unless the additional queries are used for prompts.