Chapter 4 Using the Report Editor


Modifying the collection of a report item

A collection is a list of child objects associated with a parent object. For example, the collection of a class is the list of classes in the current model. By default, each pre-built package, object or object-dependent item in the Available Items pane is associated with a collection.

You can create calculated collections and extended collections.

A calculated collection is a list of associated objects with a particular semantic, these associated objects are not directly linked to the current object in the PowerDesigner metamodel. You define a calculated collection on an object when you want to highlight a specific aspect of that object, like for example the sequence diagrams that display a specific operation. A calculated collection corresponds to a dependency list in the report.

For more information about how to create a calculated collection, see the "Defining a Calculated Collection in a Profile" section in the "Managing Profiles" chapter of the Advanced User Documentation .

An extended collection is used to define an additional link between a selected metaclass or stereotype, and another metaclass or stereotyped metaclass. For example, to attach documents containing use case specifications to the different packages of a model you can create an extended collection in the package metaclass and define FileObject as the target metaclass. An extended collection corresponds to a list of objects in the report.

For more information about how to create an extended collection, see the "Defining an Extended Collection in a Profile" section in the "Managing Profiles" chapter of the Advanced User Documentation .

In order to represent a collection in a report, you can change the collection associated with a book or list item and set it to display the content of a calculated or extended collection to document a specific aspect of the model.

Since calculated or extended collections can associate objects that are not directly linked in the metamodel, you can drag and drop any item under any other item in the report. There is no control over the location where you drop report items, and you are responsible for the global consistency of items and collections in your report.

Once you have dropped the appropriate item, you can modify its collection and select a calculated or extended collection.

Book item

In the following example, you define on operations a calculated collection that retrieves the diagrams where messages using a given operation are displayed. In the report, if you want to have these diagrams displayed, you have to insert a diagram item under the operation item and select the calculated collection for the diagram item.


As a result, the generated report displays for each operation, the diagrams showing the messages used by this operation.

List item

In the following example, you have stereotyped extended objects used to complement a PDM. In order to manage the "schedule" concept and the "event" concept, the extended objects <<event>> have an extended collection of extended objects <<schedule>>. To represent in the report the list of schedules for each event, you build the following report:


Report Wizard

Note that if you create extended or calculated collections in your model and use the Report Wizard to create your report, the generated report automatically creates a list for each type of extended collection and one for each type of calculated collection:


For more information about the Report Wizard, see the Creating a report with the Report Wizard section in the "Creating Model and Multi-Model Reports" chapter.

Steps To modify the collection of an item:

  1. Drag and drop the appropriate item (book or list) under the selected book item in the Report Items pane.
  2. Right-click the book or the list item and select Collection to display the Item Collection dialog box.
  3. Select a collection in the Collection list.
  4. Click OK.

 


Copyright (C) 2007. Sybase Inc. All rights reserved.