Creating categories for reports

You can group related reports in the Metrics reports listing by adding the report entries under a special category entry in the reports-config.xml file. For example, if you create several custom reports related to a particular theme, you can group them in the reports listing so that users can easily see that the reports are related.

Before you begin

When you categorize reports, the reports are displayed with a text label that does not link to any additional report. If you want to group related reports under a more general report without creating an extra text label, you should nest the reports instead of creating a report category.

About this task

When a user views the Metrics user interface, each report’s name is displayed as a link; the user clicks a link to view the corresponding report. If you create a set of related reports, you may want to group their names in the Metrics user interface so that users can easily see which reports are related. You can group reports by editing the reports-config.xml file and creating a special category entry, and then adding an entry tag for each related report within the category’s entry tag. Note that a category is simply a text label that appears in the user interface, so it does not have a link associated with it.

Procedure

  1. On the computer where Cognos® BI Server is installed, open the reports-config.xml file for editing.
    The file is typically located in the following directory:
    IBM\WebSphere\AppServer\profiles\Profile_Name\config\cells\Cell_Name\LotusConnections-config\metrics
    for example:
    IBM\WebSphere\AppServer\profiles\AppSrv01\config\cells\cognos01\LotusConnections-config\metrics
  2. In the reports-config.xml file, locate the section where you want to add the new report category.

    The description for each report begins with an <entry tag that specifies the report ID and label, and ends with a closing </entry> tag. Be sure to add your new entry between existing entries and not within one.

    <entry id="snow_sports_products" type="report" label="PRODUCTS.SNOW.SPORTS">
       <link>
       <!<CDATA</servlet/dispatch/ext?b_action=cognosViewer&ui.action=run&ui.name=main&run.outputFormat=&run.prompt=false&cv.header=false&cv.toolbar=false&ui.object=%2fcontent%2fpackage%5b%40name%3d%27metrics%27%5d%2ffolder%5b%40name%3d%27global%27%5d%2ffolder%5b%40name%3d%27customized%27%5d%2freport%5b%40name%3d%27main%27%5d]]&#62;
       </link>
    </entry>
  3. Create an entry tag for the new category, remembering to end it with the closing </entry> tag.

    Provide the following information for the new category:

    • id – Provide a brief description that will not change even if you modify the report’s label later. This ID must match the value used in the report itself so that the Metrics application can locate it.
      <entry id="seasonal_products" type="category" label="PRODUCTS.SEASONAL">
    • type – Specify the type of entry that you are creating; use category as the value.
      <entry id="seasonal_products" type="category" label="PRODUCTS.SEASONAL">
    • label – Provide a text label that will appear as the report’s name in the user interface.
      <entry id="seasonal_products" type="category" label="PRODUCTS.SEASONAL">
    For example:
    <entry id="seasonal_products" type="category" label="PRODUCTS.SEASONAL">
    </entry>
  4. Add an entry tag for report that belongs in the new category, inserting the entry between the beginning of the category’s <entry tag and its closing </entry> tag.

    The example that follows groups two specific product reports under the seasonal_products category; in the Metrics user interface the links for the spring and autumn product reports will display in the "Seasonal products" category. Notice that there is no link associated with the seasonal products category.

    <entry id="seasonal_products" type="category" label="PRODUCTS.SEASONAL">
    
       <!-- SPRING report -->
       <entry id="seasonal_products_spring" type="report" label="PRODUCTS.SEASONAL.SPRING">
          <link>
          <!<CDATA</servlet/dispatch/ext?b_action=cognosViewer&ui.action=run&ui.name=main&run.outputFormat=&run.prompt=false&cv.header=false&cv.toolbar=false&ui.object=%2fcontent%2fpackage%5b%40name%3d%27metrics%27%5d%2ffolder%5b%40name%3d%27global%27%5d%2ffolder%5b%40name%3d%27customized%27%5d%2freport%5b%40name%3d%27main%27%5d]]&gt;
          </link>
       </entry>
    
       <!-- AUTUMN report -->    
       <entry id="seasonal_products_autumn" type="report" label="PRODUCTS.SEASONAL.AUTUMN">
           <link>
           <!<CDATA</servlet/dispatch/ext?b_action=cognosViewer&ui.action=run&ui.name=main&run.outputFormat=&run.prompt=false&cv.header=false&cv.toolbar=false&ui.object=%2fcontent%2fpackage%5b%40name%3d%27metrics%27%5d%2ffolder%5b%40name%3d%27global%27%5d%2ffolder%5b%40name%3d%27customized%27%5d%2freport%5b%40name%3d%27main%27%5d]]&gt;
           </link>
       </entry>
    
    </entry>
  5. Save and close the file.
  6. Refresh the browser before viewing the Metrics user interface to verify the grouped reports.

    There is no need to restart the Cognos® BI Server.