Siebel Reports Administration Guide > Sorting Records in Memory >

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). You should examine the report output in Siebel Sales and the report design in Actuate e.Report Designer Professional, leaving both open to compare them.

To generate the Contacts By Opportunity report

  1. Open Siebel Sales.
  2. From the Site Map button, navigate to Contacts > Contacts List.

    My Contacts is the default view.

  3. Click the Reports button, and from the drop-down list select By Opportunity.

    The Contacts By Opportunity report appears in a new web browser window.

To open the report design for the Contacts By Opportunity report

  1. Open Actuate e.Report Designer Professional.
  2. Choose File > Open.
  3. In the Open dialog box, navigate to the C:\Siebdev\RPTSRC\ENU\STANDARD folder (or the equivalent on your computer) and choose Cntopp.rod.

    If your installation uses a non-English version of Siebel eBusiness Applications, you do not have an \ENU folder. Instead, you have a folder in the appropriate language code for your installation, such as \DEU for Germany.

    See Global Deployment Guide for a list of three-letter International Standards Organization (ISO) language extensions.

The Cntopp.rod report design file in Actuate e.Report Designer Professional is shown in Figure 19.

Figure 19.  Contacts By Opportunity Report Design
Click for full size image

Notice 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