Siebel Reports Administration Guide > Sorting Report Records > Examining a Report Sorted on a Multi-Value Field (MVF) >

About the Fetch Method on the Detail Datastream

The Fetch method on the detail datastream joins the master and detail data rows to create a combined data row, which is subsequently added to the RowList global list. The field structure of the combined data row is defined in the data row child component of the combined datastream component. In the Opportunities By Sales Rep example, the combined data row is CombinedDataRow, and this is a child of the GetFromList datastream.

The Fetch method in the detail datastream has the following code:

Function Fetch( ) As AcDataRow

Dim aInsideDataRow As ssPositionDataRow

Dim aOutsideDataRow As ssOpportunityDataRow

Dim aCombinedDataRow As CombinedDataRow

' Initialize the List Object if it has been initialized

' This should only happen for the first time through

   If RowList Is Nothing Then

      Set RowList = New AcSingleList

   End If

' Get the current inside row

   Set aInSideDataRow = Super::Fetch( )

   If aInSideDataRow is Nothing Then

      Set Fetch = Nothing

      Exit Function

   End If

' Get a pointer to the Outside Data Row Variable, declared on the DataSource

   Set aOutsideDataRow = OPSLSREP::QueryOuter::OutSideDataRow

   If aOutsideDataRow Is Nothing Then

      Exit Function

   End If

' Create a new CombinedDataRow

   Set aCombinedDataRow = New CombinedDataRow

' Fill Combined Data row with entries from inner row

   aCombinedDataRow.ssSales_Rep = aInSideDataRow.ssLogin_Name

   aCombinedDataRow.ssPosName = aInSideDataRow.ssName

   aCombinedDataRow.ssClose_Date = aInSideDataRow.ssOpportunity_Close_Date

   aCombinedDataRow.ssClose_Date_Formatted= aInSideDataRow.ssOpportunity_Close_Date_Formatted

   aCombinedDataRow.ssRevenue_Formatted = aInSideDataRow.ssOpportunity_Revenue_Formatted

   aCombinedDataRow.ssRevenue= aInSideDataRow.ssOpportunity_Revenue

' Get values that are required from the outside data row

   aCombinedDataRow.ssName = aOutSideDataRow.ssName

   aCombinedDataRow.ssAccount = aOutSideDataRow.ssAccount

   aCombinedDataRow.ssCity = aOutSideDataRow.ssCity

   aCombinedDataRow.ssDescription = aOutSideDataRow.ssDescription

   aCombinedDataRow.ssPostal_Code = aOutSideDataRow.ssPostal_Code

   aCombinedDataRow.ssRep__ = aInSideDataRow.ssOpportunity_Rep__

   aCombinedDataRow.ssSales_Stage = aOutSideDataRow.ssSales_Stage

   aCombinedDataRow.ssState = aOutSideDataRow.ssState

   aCombinedDataRow.ssStreet_Address = aOutSideDataRow.ssStreet_Address

' Handle inside row so that Fetch continues to function

   Set Fetch = aInsideDataRow

' Add the newly created combined datarow to the Global list of rows


End Function

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