Siebel Reports Administration Guide > Sorting Report Records >

Examining a Report Based on a Many-to-Many Relationship


A good many-to-many report to study is the Contacts By Opportunity report, which is invoked from a view in the Contacts screen (typically the My Contacts view). Examine the report output in Siebel Sales and the report design in Actuate e.Report Designer Professional, leaving both open to compare them.

This topic describes how to generate the Contacts By Opportunity report and how to open the design file for that report.

To generate the Contacts By Opportunity report

  1. Open the Siebel client.
  2. Navigate to the Contacts screen, and then the Contacts List view.
  3. From the application-level menu, click Reports, and then the By Opportunity menu item.

    The report opens in a separate Siebel Report Viewer window. Note that the application may require several seconds to generate the report.

  4. With the ALT key depressed, tap the TAB key to navigate to the Siebel Report Viewer window, and then examine the report layout.

Next, open the report design for the Contacts By Opportunities report.

To open the report design for the Contacts By Opportunity report

  1. In Actuate e.Report Designer Professional, open the Cntopp.rod file.

    For more information, see Opening a Standard Siebel Report.

  2. Examine the report design, comparing design components to their corresponding features in the report output in the Siebel Report Viewer.

Note the following features of this report design (especially in comparison to the Opportunities By Sales Rep report described in Examining a Report Sorted on a Multi-Value Field (MVF)):

  • The structures of the reports and the code defined on the corresponding datastreams and data filters are very similar between the reports.
  • The global list variable and the master row global variable are both defined on the report design component Cntopp.rod. In Oppslsrep.rod, the global data row variable was defined in datastream Fetch code, which accomplishes the same result. Defining the data row variable on the report design component is preferable for clarity in your design.
  • The Compare method in Cntopp.rod sorts the merged records primarily on opportunity name and secondarily on contact last name. This is consistent with the sorting and grouping requirements of the final report.
  • If you open Siebel Tools and navigate to the report object definitions for the Cntopp.rod report (Contacts - By Opportunity) and its children, you can see that contact records are the parent, and opportunity records (with only the Name field exposed) are the child. This is also reflected in the report design in Actuate, with the master datastream obtaining contacts and the detail datastream obtaining opportunities for each contact.

    This structure is analogous to what was done in the Opslsrep.rod object definitions and report design. The business component that is to be sorted and printed is the master. The business component that provides the sort key is the detail. While this may seem counterintuitive in the case of a many-to-many report, in which the detail business component provides the group headings and the master business component provides the detail report rows, it is consistent with the data model of the Contact business object. Since the report is invoked from views in the Contacts screen, where the Contact business object is active, it is not possible to obtain records through a master-detail relationship in which Opportunity is the master. To do so would provide no benefit in any case because the records of the two business components are merged before sorting.

Siebel Reports Administration Guide Copyright © 2009, Oracle and/or its affiliates. All rights reserved. Legal Notices.