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

Reuse a Layout Object

You can save time by reusing layout objects that you add to a report instead of re-creating them. For example, you have a multiple-page report and you want to show the company logo in the page header of each page. Insert the logo once and reuse it on all other pages.

Steps
  1. Click the object that you want to reuse.

    Tip: To quickly select the parent of an object, click the object, and then click the select ancestor button  in the title bar of the Properties pane.

  2. In the Properties pane, in the Name property, type a value beginning with a letter to uniquely identify the object and press the Enter key.

    Report Studio may have already specified a name for the object.

  3. To reuse the object in another report, open that report.

  4. In the Insertable Objects pane, on the Toolbox tab , drag the Layout Component Reference object to the location where you want to reuse the object.

  5. In the Component Location box, do the following:

  6. In the Available components to reference box, click the object you want and click OK.

  7. If the referenced object is in another report, click the Layout Component Reference object and in the Properties pane, click the Embed property and specify how to store the referenced object in the report:

A copy or reference of the object appears where you placed the Layout Component Reference object. If a source object is changed, you can update reused objects.

Tip: You can also create a new report or template and add all the objects you want to share. All your shared objects then reside in a single location, like a library.

Change a Reused Object

If you reuse an object that contains other objects, you can change the child objects to something different. For example, you have a block object containing a text item in the page header, and you decide to reuse the block in the page footer. However, you want the text item in the page footer block to show different text from that in the page header.

Steps
  1. In the parent object that you want to reuse, click the child object you want to change.

  2. In the Properties pane, in the Name property, type a value beginning with a letter to uniquely identify the object.

    Report Studio may have already specified a name for the object.

  3. Select the copy of the parent object you created with the Layout Component Reference object.

  4. In the Properties pane, double-click the Component Overrides property.

  5. In the Component Overrides dialog box, select the child object you want to change and click OK.

    The child object in the copy of the parent object is replaced by the following text:

    Drag & drop object to override component child.

  6. Drag the object that you want to replace the child object.

    You can replace the child object with any other object, not just an object of the same type. For example, if the child object is a text item, you can replace it with an image.

Update Reused Objects

If a report contains objects referenced in another report, you can quickly update the referenced objects if the source objects have changed. Shared objects are stored in the layout component cache.

Steps
  1. Open the report that you want to update.

  2. From the Tools menu, click Layout Component Cache.

    The Layout Component Cache dialog box appears, showing all reports that contain referenced objects and the source reports where the objects exist.

  3. To view which components are reused, click a source report.

    The components that are reused appear in the Components used pane.

  4. Click the Reload Components button to refresh all referenced objects.

    Although referenced objects are automatically refreshed when you open or run a report, clicking this button updates components that were changed while the report is open.

  5. Click the Update All Component Copies button to refresh all copied objects.

  6. Click Close.