Siebel Reports Administration Guide > Parameterized Reports > Creating Parameterized Reports >

Actuate


Make sure that you have installed Actuate e.Report Designer Professional from the CD-ROM. Since the report design process is similar to any other report, only the design specific to a parameterized report is described here. The description of creating parameterized report design in Actuate e.Report Designer Professional is described in the Designing report parameters chapter of Actuate's Designing Advanced e.Reports manual. The general process in designing a parameterized report includes two main steps:

The first step is generic to all parameterized reports and described in Actuate's Designing Advanced e.Reports manual. The second step is specific to Siebel parameterized reports and is described here for the Revenue Analysis Summary report.

When Revenue Analysis Summary report is run from a Revenue screen, the parameter screen appears after the Run Now option is selected or after the schedule parameters are entered with the Schedule option. The user needs to select a value for each of the three parameters from the drop-down lists before clicking Finish.

The report is then generated and displays the first parameter field (which is the grouping field) in a cross tab format with the second parameter in aggregated date scale along columns, and the third parameter as rows. Therefore, this report is essentially a cross tab report (for more details, see Reports with Group Sections in this book and the "Presenting data in crosstabs" section in the Developing Advanced e.Reports Actuate manual) with the displayed field selected by the user at run time. The second parameter defines the columns and the third parameter defines the rows.

To set report parameters

The report process parameters are set by the user in the client in the following order.

  1. Store language dependent parameters fetched from the report ROV file (in the Start() method of root node `revd') as global variables.
  2. Sub Start()

    ...........................

          ' get language values from user entered parameters

          ThenParameterV=ThenInRevenue

          ValueParameterV=ShowInRevenue

          ByParameterV=ByInRevenue

    ................................................

    End Sub

  3. Get the language independent codes for the parameter values selected by the user from the LOV table.
  4. ThenParameter = represents a group key.

    ValueParameter = represents a metric key.

    ByParameter = represents a date key.

    These values are necessary to support internal report logic that is language independent. The parameter retrieval is based on the ssSmart.rol library custom DataStream control ssList_Of_ValuesQuery (select ssSmart.rol from Library Organizer menu, double click on ssList_Of_ValuesQuery, and select Class tab).

    Modify the control methods Start() and Fetch() to set a search specification dynamically and store retrieved parameter language independent values.

    Function Start() As Boolean

    Dim DateSt as String

    Dim ValueSt as String

    Dim ThenSt as String

    ` create Search Spec date portion based on LOV or default `

    ` value

    if revdet::ByParameterV <> "" Then

    DateSt = "[Value] = '" & revdet::ByParameterV & "'"

    else

    DateSt = "[Name] = 'Month'"

    end if

    ` create Search Spec Value portion based on LOV or default `

    ` value

    if revdet::ValueParameterV <> "" Then

    ValueSt = "[Value] = '" & revdet::ValueParameterV &"'"

    else

    ValueSt = "[Name] = 'Revenue'"

    end if

    ` create Search Spec Then portion based on LOV or default `

    ` value

    if revdet::ThenParameterV <> "" Then

    ThenSt = "[Value] = '" & revdet::ThenParameterV & "'"

    else

    ThenSt = "[Name] = 'Account'"

    end if

    ' dynamic search spec

    SearchSpec="[Type] = 'REVN_FUNCTIONCAPTIONS' AND " & ValueSt

    + & " OR [Type] = 'REVN_SERIESCAPTIONS' AND " & ThenSt

    + & " OR [Type] = 'FCST_INTVL_PERD_TYPE' AND " & DateSt

    Start = Super::Start( )

    End Function

    Function Fetch( ) As AcDataRow

    Dim aRow As ssList_Of_ValuesDataRow

    Set Fetch = Super::Fetch( )

    If Fetch Is Nothing Then

       Exit Function

    End If

    set aRow = fetch

       Select Case aRow.ssValue

       case revdet::ByParameterV

       revdet::ByParameter=aRow.ssName

       case revdet::ValueParameterV

       revdet::ValueParameter=aRow.ssName

       case revdet::ThenParameterV

       revdet::ThenParameter=aRow.ssName

       End Select

       End Function

  5. Use date parameter ByParameterV to set a search specification for ssPeriodQuery data stream from revper.rol. As a result Period business component returns only period record of specified type (day or month or quarter or year).
  6. Sub Start( )

    Super::Start( )

    ' set search spec to get only needed period type records

    ssReport::ssSearchSpec = "[Period Type]='" &

    revdet::ByParameterV & "' "

    End Sub

  7. Use ByParameter and ValueParameter parameter values to fill out revenue Line Item record dynamically. The purpose here is to create a list of revenue records that are independent of user parameters to make sure that general logic works correctly. Later, line item records are stored in a memory list for further aggregation.
  8. Function CreateUListRow(Rec as acDataRow ) as uListRow

    Dim uRec as uListRow

    Dim aRec as ssRevenueDataRow

    dim CurrentSection as integer ' put into root

    ' calculate section key and UnitKeyStat

    CurrentSection=GetGroupKey()

    Set aRec = rec

    set uRec = New uListRow

    ' filter ByParameter

    Select Case LCase(revdet::ThenParameter)

       case "account"

          uRec.uThen=aRec.GetValue("ssAccount")

       case "campaign"

          uRec.uThen=aRec.GetValue("ssCampaign")

       case "opportunity"

          uRec.uThen=aRec.GetValue("ssOpportunity")

       case "project"

          uRec.uThen=aRec.GetValue("ssProject")

       case "partner"

          uRec.uThen=aRec.GetValue("ssPartner")

       case "product"

          uRec.uThen=aRec.GetValue("ssProduct")

       case "product line"

          uRec.uThen=aRec.GetValue("ssProduct_Line")

       case "description"

          uRec.uThen=aRec.GetValue("ssDescription")

       case "revenue type"

          uRec.uThen=aRec.GetValue("ssRevenue_Type")

       case "revenue class"

          uRec.uThen=aRec.GetValue("ssRevenue_Class")

       case "win probability"

          uRec.uThen=aRec.GetValue("ssWin_Probability")

       case "sales rep"

          uRec.uThen=aRec.GetValue("ssSales_Rep")

       case "contact last name"

          uRec.uThen=aRec.GetValue("ssContact_Last_Name")

       case "Quote"

          uRec.uThen=aRec.GetValue("ssQuote")

       Case Else

          if gErrorMsg = "" then gErrorMsg =

    "'Then' parameter is invalid"

             Exit Function

    End Select

    ' filter ValueParameter

    Select Case LCase(revdet::ValueParameter)

    case "revenue"

    uRec.uValue=toCur(aRec.GetValue("ssFunctional_Revenue_

    Formatted"))

    case "margin"

    uRec.uValue=toCur(aRec.GetValue("ssFunctional_Margin_

    Formatted"))

    case "cost"

    uRec.uValue=toCur(aRec.GetValue("ssFunctional_Cost_

    Formatted"))

    case "upside"

    uRec.uValue=toCur(aRec.GetValue("ssFunctional_Upside_

    Formatted"))

    case "downside"

    uRec.uValue=toCur(aRec.GetValue("ssFunctional_Downside

    _Formatted"))

    case "average price"

    uRec.uValue=toCur(aRec.GetValue("ssFunctional_Average_

    Price_Formatted"))

    case "quantity"

    uRec.uValue=toCur(aRec.GetValue("ssQuantity_Formatted"))

    Case Else ' default

    if gErrorMsg = "" then gErrorMsg = "'Show' parameter

    is invalid"

    Exit Function

    End Select

    ' Get values for the remaining fields

    uRec.uItem=aRec.GetValue("ssProduct")

    uRec.uCommit=aRec.GetValue("ssCommitted")

    uRec.uProb=aRec.GetValue("ssWin_Probability_Formatted"))

    uRec.uSalesRep=aRec.GetValue("ssSales_Rep")

    uRec.uRevCls=aRec.GetValue("ssRevenue_Class")

    uRec.uRevTp=aRec.GetValue("ssRevenue_Type")

    uRec.uCurrencyCode=aRec.GetValue("ssFunctional_Currency_Co de")

    uRec.uDate=CDate(aRec.GetValue("ssDate_Formatted"))

    uRec.SectionKey = CurrentSection

    uRec.uDateUnit = UnitKeyStat ' GetUnitKey(uRec.uDate)

    ' create key for Item grouping based on displayed attributes

    ' Item+Commit+Prob

    uRec.ItemKey= Trim(uRec.uItem) & Trim(uRec.uCommit) &

    Trim(uRec.uProb)

    Set CreateUListRow = uRec

       End Function

Parts of the described approach to handling the user parameters can be of general use for other parameterized reports. They include Parameters retrieval, filtering Periods, and fetching values from the LOV table.


 Siebel Reports Administration Guide, Version 7.5, Rev B 
 Published: 18 April 2003