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

Creating a Report

When you create a report in Query Studio, you are actually creating a query definition, which is a specific set of instructions for extracting particular data.

Before you can create a report, the administrator must have previously created a package in Framework Manager and published it to a location in the Cognos Connection portal to which you have access. In addition, the administrator must grant you Query Studio capabilities before you can begin. You need the Create capability to create reports and the Advanced capability to use advanced authoring features, such as creating complex filters.

Before you use Query Studio, answer the following questions:

Creating a report involves the following tasks:
      

Create the report.

      

Add data.

      

Save the report.

      

Run the report.

You can work with the data that appears in the report and change the layout .

Create a Report

You can create a report from scratch by inserting items from the data source into an empty report.

You can also create a new report by opening an existing report, changing it, and saving it using another name.

Steps
  1. In the Cognos Connection home page, on the Public Folders tab, navigate to the package  that you want to use as a data source.

    If there is more than one package available, the Select a Package page appears. No Entries means that no reports were created using this package.

    You may not be able to use a package if you do not have access permission. For example, if the data source is a cube, cube security may prevent you from accessing certain data. For more information, contact your administrator.

  2. From the Launch menu, click the Query Studio link .

    Query Studio opens. The query items you can use are listed in the left pane.

    Tip: To exit Query Studio and return to Cognos Connection, click Return.

You can now add data and save the report.

Open an Existing Report

You can open an existing report to make changes to it, use it as the basis of a new report, or view the current data.

You can also create a new report from scratch .

Step

Tips

Reports and Package Versions

In Query Studio, reports always use the most recent version of the package. If the package is republished, you are notified that the report will use the newest version of the package. You must save the report to complete the update.

Note that changes to the package can affect the report.

In Cognos Viewer, if you open a saved report after the package it is based on is republished, one of two things happens:

For information about using the report viewer to produce an HTML version of a report, see the Cognos Connection User Guide.

The report modeler specifies whether previous versions of a package are preserved. For information about model versioning, see the Framework Manager User Guide.

Add Data to a Report

A new report contains no data. You choose the report items that you want to include in the report from the package. Packages can include

Items added from the package to your report are called report items. Report items appear as columns in list reports, and as rows and columns in crosstab reports. In charts, report items appear as data markers and axis labels.

You can expand the scope of an existing report by inserting additional report items, or you can focus on specific data by removing unnecessary report items.

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.

You can also add calculations 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.

 

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:

  • Root level Years

  • First level Year

  • Second level Quarter

  • Third level Month

 

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.

Steps
  1. Open a report in Query Studio.

  2. Click the Insert Data menu command.

    A tree hierarchy of the selected package appears in the left pane.

    Note: If you are working with a dimensional data source, the names of levels and members in a dimension come from the model. It is the responsibility of the modeler to provide meaningful names.

  3. In the left pane, double-click the items you want to add.

    The items appear in the work area.

Tips

Save a Report

Save your report to preserve any changes.

What you save in Query Studio is the query definition, which is a specific set of instructions for extracting particular data. It is not a snapshot of the data you retrieve at the time you save the report. For example, if you run a report that you saved two weeks ago, the data in the report reflects any changes in the updated data source.

Steps
  1. Click the save button  on the toolbar.

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

    If you want to include a description, type the information you want to add in the Description box.

  3. Click OK.

Save a Report Using a Different Name or Location

You can save a report using a different name or location to use it as the basis of a new report.

Steps
  1. Click the save as button  on the toolbar.

  2. Specify a name and location.

    To include a description, type the information you want to add in the Description box.

  3. Click OK.

Run a Report

You can run a report to retrieve any recently updated data from the data source. A Query Studio report also runs when you open it, or when you make any changes.

If you run a report against a data source that does not support functions or features in the report, an error message appears that explains why the action is not supported. This happens more frequently when you use a dimensional data source.

You can cancel a query that is running only during the initial portion of its execution. After this time, the report runs to completion.

For information about other run options, see the Cognos Connection User Guide.

Run with Prompts

In Query Studio, prompts ask for user input to define the content of a report. If a report contains prompts, you are prompted when you open the report and when you run the report. For information about prompts, see Use a Prompt.

Run with All Data

The Run With All Data command runs the report using the full data source. Running a report can take a long time. If you plan to make several changes to a report, run the report in preview mode to save time and computer resources by limiting the rows of data that your report retrieves.

Preview Reports with No Data

Preview reports with no data when you want to see what your report will look like without using actual data. This is useful when you are designing your report or when you want to make formatting changes. When you preview reports with no data, you do not use the data source at all. Artificial data replaces the numbers and characters from the data source. None of the data is correct.

When a preview uses no data, a torn border appears at the top and bottom of your report as a visual reminder that you are not using the entire data source.

Preview Reports with Limited Data

By limiting data retrieval, you can run reports more quickly.

Preview mode improves the report performance only if the data modeler defines one or more design mode filters in the Framework Manager project. Design mode filters restrict the amount of data that a preview report retrieves to a predetermined limit. A report based on a package that does not contain a design mode filter is not faster when run in preview mode.

Preview mode does not work if you are using a dimensional data source. In addition, a report in limited data mode does not compute rollups.

Note: You cannot change this predetermined limit in Query Studio. For information about creating filters in Framework Manager, see the Framework Manager User Guide.

When you use this command, remember that the data retrieved in preview mode is not complete. The accuracy of the data returned is limited to the number of preview rows predefined in the model. For example, summarized values will be incorrect because they do not include all of the data.

When a preview uses limited data, a torn border appears at the top and bottom of your report as a visual reminder that you are not using the entire data source.

Steps
  1. Open the report that you want in Query Studio.

  2. From the Run Report menu, choose how to run the report:

View a Report in PDF Format

To save a snapshot of your report data, you can create a PDF (Portable Document Format) version of your report.

Note: For best results, use the PDF format when you want to print a report.

You must have Adobe Acrobat Reader installed on your computer to view a report in PDF format.

Steps
  1. Open the report that you want in Query Studio.

  2. From the Run Report menu, click View in PDF Format .

The report opens in PDF format in a new window.

Tip: To specify the orientation and page size of your PDF report, from the Run Report menu, click Specify PDF Options.

View a Report in CSV Format

You can view list reports in CSV (Comma Separated Values) format.

The output is determined by the configuration of the computer and by the browser. If you have Excel installed on your computer, you may see Excel appear within your browser window or in a new window, depending on the configuration. If Excel appears in your browser window, you will see the File menu.

You may be asked whether you want to download the CSV file, or you may have the option to open it or save it.

If the user has an application other than Excel associated with CSV, then the browser will call that application.

You cannot view charts or crosstab reports in CSV format.

Steps
  1. Open the report that you want in Query Studio.

  2. From the Run Report menu, click View in CSV Format.

    The report opens in an Excel spreadsheet.

  3. In the File menu, click Save As, and specify a name and location.

    The report is saved as a text file that you can import into other products.

View a Report in XML Format

You can view reports in XML format.

Steps
  1. Open the report that you want in Query Studio.

  2. From the Run Report menu, click View in XML Format.

    The report opens in XML format in a new window.

View a Report in Excel 2000 Format

You can view reports in Microsoft Excel versions earlier than 2002.

Excel 2000 format supports up to 65,536 rows and multiple sheets.

Date Formats and Excel

The Cognos 8 full date format does not always display 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, re-apply the proper format in Excel.

Other limitations exist when producing reports in Microsoft Excel format.

For information about these limitations, see Producing Reports in Microsoft Excel Format.

Steps
  1. Open the report that you want in Query Studio.

  2. From the Run Report menu, click View in Excel 2000 Format.

    The report opens in a new window.

View a Report in Excel 2000 Single Sheet Format

You can view reports on a single sheet in Microsoft Excel versions earlier than 2002.

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 2000 single sheet format also offers the following benefits:

Date Formats and Excel

The Cognos 8 full date format does not always display 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, re-apply the proper format in Excel.

Other limitations exist when producing reports in Microsoft Excel format.

For information about these limitations, see Producing Reports in Microsoft Excel Format.

Steps
  1. Open the report that you want in Query Studio.

  2. From the Run Report menu, click View in Excel 2000 Single Sheet Format.

    The report opens in a new window.

View a Report in Excel 2002 Format

You can view reports in Microsoft Excel versions 2002 and later.

Excel 2002 format offers the following benefits:

Limitations exist when producing reports in Microsoft Excel format.

For information about these limitations, see Producing Reports in Microsoft Excel Format.

Steps
  1. Open the report that you want in Query Studio.

  2. From the Run Report menu, click View in Excel 2002 Format.

    The report opens in a new window.

Open a Report in Report Studio

You can open a Query Studio report in Report Studio to add more functionality to your report.

You must have the necessary permissions before you can open a Query Studio report in Report Studio.

Step

Print a Report

Print your report to obtain a paper copy.

For best results, use the PDF format when you want to print a report.

You can also print a report from Cognos Connection. For more information, see the Cognos Connection User Guide.

Steps
  1. Open the report that you want in Query Studio.

  2. From the Run Report menu, click View in PDF Format .

    The report opens in PDF format.

  3. On the Acrobat Reader toolbar, click print.

  4. Select the print options you want and click OK.