Bookshelf Home | Contents | Index | PDF |
Siebel Reports Administration Guide > Actuate Method Reference > Essential DataStream Methods > About the Start MethodThe Start method has two prominent roles. It creates the Siebel Object Manager interface objects required to populate the data row, and it makes sure that the required fields are active. The Start method is called only on the master datastream. If a subreport uses the same business object, the subreport (child) datastream uses the interface created by the parent (master) datastream. Similarly, since fields are activated in the Start method, the master datastream activates fields for all its children. NOTE: The code is written such that the user's screen does not change while the report is being generated, even if a subreport uses a different business component. The following code sample is from the Start method in the ssAccountQuery datastream component in the Aclist (Account List) report. baseReport::bCurRowOnly = bCurRowOnly baseReport::bQueryExecuted = False ssAppServer = ssReport::ssiSiebelServer ssModelSetPositionId (ssAppServer, ssReport::ssPositionId) ssBO = ssModelGetBusObject (ssAppServer, ssReport::ssBusObjectName) ssReport::ssActiveBusObject = ssBO ' SearchSpec is recieved depending on where it is originated If (ssReport::ssSearchSpec <> "") And (errCode = 0) Then searchSpec = ssReport::ssSearchSpec ' SortSpec is recieved depending on where it is originated If (ssReport::ssSortSpec <> "") And (errCode = 0) Then SortSpecDyn = ssReport::ssSortSpec If (errCode = 0) Then ssAccount = ssBusObjGetBusComp (ssBO, "Account") If (errCode = 0) Then ssBusCompSuppressNotification (ssAccount) If (errCode = 0) And (ssType = 2) Then ssBusCompDeactivateFields (ssAccount) If (errCode = 0) Then curViewMode = ssBusCompGetViewMode (ssAccount) ' If the main report BusComp has a search or sort spec, ' or uses a field that isn't already active, its query If (ssType = 2) Then bReExecute = True If (Not bReExecute) Then bReExecute = (searchSpec <> "") Or (SortSpecDyn <> "") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsExecuted", "") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Account Status") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "City") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Competitor") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Country") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Description") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Industry") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Location") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Main Fax Number") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Main Phone Number") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Name") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Parent Account Name") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Postal Code") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "State") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Street Address") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Synonym") = "N") If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "IsFieldActive", "Type") = "N") ' Last check if business component needs to be re-executed If (errCode = 0) And (Not bReExecute) Then bReExecute = (ssBusCompInvokeMethod (ssAccount, "ReExecuteReport", "") = "Y") ' Cache the current row-id so it can be re-queried If (bCurRowOnly) Then mainRowId = ssReport::ssActiveRowId If (errCode = 0) And (ssType = 1) And (bReExecute) Then ' To re-execute a current-row-only report, the active ' BusComp need not be disturbed. Another BusObj can ' be constructed just for this query. ' This is NOT applicable for server based report generation. If (bCurRowOnly) And (ssReport::ssBusObjectName = "") Then baseReport::bQueryExecuted = True If Not ( ssAccount = 0 ) Then ssBusCompAllowNotification (ssAccount) If (errCode = 0) Then busObjName = ssBusObjGetName (ssBO) If (errCode = 0) Then ssBO = ssModelGetBusObject (ssAppServer, busObjName) If (errCode = 0) Then ssAccount = ssBusObjGetBusComp (ssBO, "Account") If (errCode = 0) Then ssBusCompSetViewMode (ssAccount, curViewMode) If (errCode = 0) Then ssBusCompSuppressNotification (ssAccount) ' Now actually setup the main report BusComp If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Account Status") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "City") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Competitor") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Country") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Description") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Industry") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Location") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Main Fax Number") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Main Phone Number") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Name") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Parent Account Name") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Postal Code") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "State") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Street Address") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Synonym") If (errCode = 0) Then ssBusCompActivateField (ssAccount, "Type") If (errCode = 0) Then ssBusCompInvokeMethod (ssAccount, "SetIgnoreMaxCursorSize", "Y") If (errCode = 0) And (ssType = 2) And (bCurRowOnly = FALSE) Then If (baseReport::bSetForward) Then ssBusCompInvokeMethod(ssAccount, "GotoBookmarkT", ssReport::ssBookmark) ssBusCompInvokeMethod(ssAccount, "GotoBookmarkF", ssReport::ssBookmark) If (errCode = 0) And (searchSpec <> "") And ((Not bCurRowOnly) Or (ssReport::ssBusObjectName <> "")) Then ssBusCompSetSearchExpr (ssAccount, searchSpec) If (errCode = 0) And (SortSpecDyn <> "") Then ssBusCompSetSortSpec (ssAccount, SortSpecDyn) If (errCode = 0) And (ssReport::ssBusObjectName <> "") And (ssReport::ssViewMode <> "") Then ssBusCompSetViewMode (ssAccount, CInt (ssReport::ssViewMode)) ' Re-execute business components as necessary If (bCurRowOnly) And (mainRowId <> "") Then ssBusCompSetSearchExpr (ssAccount, "Id = """ + mainRowId + """") If (errCode = 0) Then ssBusCompExecuteQuery2 (ssAccount, baseReport::bSetForward, True) ssBusCompInvokeMethod (ssAccount, "UpdateLinks", "") ssProcessLastError(ssAppServer, "", "") At this point, the Siebel business component, in this case Account, has been exposed to Actuate, and the Siebel Object Manager interface has been called. The fields for the business object identified by the Siebel client's active view have been activated and are available to the data row object. |
Siebel Reports Administration Guide | Copyright © 2009, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |