<finReportTemplate version="1.00" exportedUtcDate="2012-08-26T19:45:14.0000000"><CreatedUtcDate>2012-05-17T04:07:59.0000000</CreatedUtcDate><CreatedUserId>Admin</CreatedUserId><UpdatedUtcDate>2012-08-26T19:40:09.0000000</UpdatedUtcDate><UpdatedUserId>Admin</UpdatedUserId><Active>true</Active><SourceId>AccountTrialBalance</SourceId><SourceType>Report</SourceType><Category /><Description>Unearned Interest Report</Description><ReportTemplateId>REP.UI</ReportTemplateId><Notes>This report shows Interest Earned and Unearned for Precomputed Loans.</Notes><PermissionKeyExecute /><Query /><ScriptCanFormatCells>false</ScriptCanFormatCells><UseDefaultParameters>false</UseDefaultParameters><UseReportingDatabase>false</UseReportingDatabase><Code>Option Explicit On

' #################################################################
' Unearned Interest Report script events

' Version: 1.03 (20/07/2012)
' #################################################################

Public Function Main(ByVal reports As ISfinReports, ByVal reportTemplateId As String, ByVal eventId As String, ByRef source As Object, ByVal parameters As ISParameters) As Boolean

  ' Parameters:
  '   reports - The Reports object
  '   reportTemplateId - The Id of the Report Template being executed
  '   eventId - The event to process
  '   source - The Source object. This varies depending on the eventId
  '   parameters - The Parameters from either the Report Template or the report (if not parameters where defined on the Report Template)

  Dim Account As finAccount
  Dim AccountCalcScheduleItem As finAccountCalcScheduleItem
  Dim DataSet As DataSet
  Dim DateAsAt As Date
  Dim dt As DataTable
  Dim InterestEarned As Decimal
  Dim InterestUnearned As Decimal
  Dim List As ISList
  Dim Row As DataRow

  ' Assume Success
  Main = True

  ' Handle Events
  Select Case eventId
    Case "DataSetUpdate"
      ' Initialise
      DataSet = DirectCast(source, DataSet)
      If parameters.GetDate("DateAsAt") = Nothing Then
        DateAsAt = Now.Date
      Else
        DateAsAt = parameters.GetDate("DateAsAt").Date
      End If

      ' Create Objects
      Account = finBL.CreateAccount

      ' Add Columns to the DataTable
      dt = DataSet.Tables(0)
      dt.Columns.Add(New DataColumn("Interest", GetType(Decimal)))
      dt.Columns.Add(New DataColumn("InterestEarned", GetType(Decimal)))
      dt.Columns.Add(New DataColumn("InterestUnearned", GetType(Decimal)))

      ' Populate Rows
      For Each Row In dt.Rows
        ' Initialise
        Row!Interest = DBNull.Value
        Row!InterestEarned = DBNull.Value
        Row!InterestUnearned = DBNull.Value

        If Account.LoadPk(finBL.Database.GetFieldInteger(Row!Pk)) Then
          If Account.Calculation.OptionInterestChargeUpfront Then
            InterestEarned = 0
            InterestUnearned = 0

            For Each AccountCalcScheduleItem In Account.CalculationVersions(0).Schedule
              If AccountCalcScheduleItem.ScheduleType = isefinAccountCalcScheduleType.Interest Then
                If AccountCalcScheduleItem.DateFrom &lt;= DateAsAt Then
                  InterestEarned += AccountCalcScheduleItem.Value
                Else
                  InterestUnearned += AccountCalcScheduleItem.Value
                End If
              End If
            Next

            ' Update Values
            Row!Interest = InterestEarned + InterestUnearned
            Row!InterestEarned = InterestEarned
            Row!InterestUnearned = InterestUnearned
          Else
            Row.Delete
          End If
        End If
      Next

    Case "UpdateExportableColumns"
      ' Add any new columns to the list of exportable columns that is supplied
      List = DirectCast(source, ISList)

      List.Add("Interest")
      List.Add("InterestEarned")
      List.Add("InterestUnearned")

  End Select

End Function</Code><Language>VisualBasic</Language><TimeoutSeconds>0</TimeoutSeconds><Parameters><ISParameterDefs version="1.00"><Parameters><Parameter name="_PageStart1" type="PageStart"><Caption>General</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /></Parameter><Parameter name="_SectionStart1" type="SectionStart"><Caption>Select the Order By and Accounts to show.</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText>The Date As At is used when calculating values such as Balance and Overdues.</TooltipText><SectionColumns>1</SectionColumns></Parameter><Parameter name="OrderBy" type="List"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>true</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value>Code</Value><Visible>true</Visible><List>Code,Name,Overdue,Overdue Days,Balance,Next Payment Date,Last Payment Date,Maturity Date</List><LimitToList>true</LimitToList><MaxLength>0</MaxLength><Rows>1</Rows></Parameter><Parameter name="OrderByDesc" type="Boolean"><Caption>Descending</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value>False</Value><Visible>true</Visible></Parameter><Parameter name="Accounts" type="Range"><Caption>Accounts</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Standard</RangeType><RangeLookupSource>Accounts</RangeLookupSource><RangeLookupSqlWhere /></Parameter><Parameter name="DateAsAt" type="Date"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression>Eom(Bom(Now())-1)</DefaultValueExpression><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>true</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><IncludeTime>false</IncludeTime><MaxValue /><MinValue /></Parameter><Parameter name="_PageStart2" type="PageStart"><Caption>Account Filters</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /></Parameter><Parameter name="_SectionStart2" type="SectionStart"><Caption>Specify Account filters.</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><SectionColumns>1</SectionColumns></Parameter><Parameter name="AccountClasses" type="CheckList"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>false</Visible><List>Fixed Term Loan</List><LimitToList>true</LimitToList><MaxLength>0</MaxLength><Rows>8</Rows></Parameter><Parameter name="DateOpened" type="DateRange"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><IncludeTime>false</IncludeTime><MaxValue /><MinValue /></Parameter><Parameter name="DateMaturity" type="DateRange"><Caption>Maturity Date</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><IncludeTime>false</IncludeTime><MaxValue /><MinValue /></Parameter><Parameter name="DateReview" type="DateRange"><Caption>Review Date</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><IncludeTime>false</IncludeTime><MaxValue /><MinValue /></Parameter><Parameter name="DateClosed" type="DateRange"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><IncludeTime>false</IncludeTime><MaxValue /><MinValue /></Parameter><Parameter name="Balance" type="NumberRange"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText>The Balance is calculated from the Date As At entered on the previous page</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><DecimalPlaces>-1</DecimalPlaces><GroupDigits>true</GroupDigits><MaxValue>999999999</MaxValue><MinValue>-999999999</MinValue><NumberSpecialType>None</NumberSpecialType></Parameter><Parameter name="Overdue" type="NumberRange"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText>The Overdue is calculated from the Date As At entered on the previous page</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><DecimalPlaces>-1</DecimalPlaces><GroupDigits>true</GroupDigits><MaxValue>999999999</MaxValue><MinValue>-999999999</MinValue><NumberSpecialType>None</NumberSpecialType></Parameter><Parameter name="OverdueContractual" type="NumberRange"><Caption>Contractual</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText>The Contractual Overdue is calculated from the Date As At entered on the previous page</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><DecimalPlaces>-1</DecimalPlaces><GroupDigits>true</GroupDigits><MaxValue>999999999</MaxValue><MinValue>-999999999</MinValue><NumberSpecialType>None</NumberSpecialType></Parameter><Parameter name="OverdueDays" type="NumberRange"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText>The Overdue Days is calculated from the Date As At entered on the previous page</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><DecimalPlaces>0</DecimalPlaces><GroupDigits>true</GroupDigits><MaxValue>999999999</MaxValue><MinValue>-999999999</MinValue><NumberSpecialType>None</NumberSpecialType></Parameter><Parameter name="OverdueContractualDays" type="NumberRange"><Caption>Contractual Days</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText>The Overdue Contractual Days is calculated from the Date As At entered on the previous page</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><DecimalPlaces>0</DecimalPlaces><GroupDigits>true</GroupDigits><MaxValue>999999999</MaxValue><MinValue>-999999999</MinValue><NumberSpecialType>None</NumberSpecialType></Parameter><Parameter name="CreditLimit1" type="NumberRange"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText>The Credit Limit is calculated from the Date As At entered on the previous page</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><DecimalPlaces>-1</DecimalPlaces><GroupDigits>true</GroupDigits><MaxValue>999999999</MaxValue><MinValue>-999999999</MinValue><NumberSpecialType>None</NumberSpecialType></Parameter><Parameter name="CreditLimit2" type="NumberRange"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText>The Credit Limit is calculated from the Date As At entered on the previous page</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><DecimalPlaces>-1</DecimalPlaces><GroupDigits>true</GroupDigits><MaxValue>999999999</MaxValue><MinValue>-999999999</MinValue><NumberSpecialType>None</NumberSpecialType></Parameter><Parameter name="CreditLimit3" type="NumberRange"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText>The Credit Limit is calculated from the Date As At entered on the previous page</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><DecimalPlaces>-1</DecimalPlaces><GroupDigits>true</GroupDigits><MaxValue>999999999</MaxValue><MinValue>-999999999</MinValue><NumberSpecialType>None</NumberSpecialType></Parameter><Parameter name="ResidualValue" type="NumberRange"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><DecimalPlaces>-1</DecimalPlaces><GroupDigits>true</GroupDigits><MaxValue>999999999</MaxValue><MinValue>-999999999</MinValue><NumberSpecialType>None</NumberSpecialType></Parameter><Parameter name="CreationMethod" type="CheckList"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><List>New,New Ex Application,Refinanced</List><LimitToList>true</LimitToList><MaxLength>0</MaxLength><Rows>8</Rows></Parameter><Parameter name="CloseMethod" type="CheckList"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><List>Not Closed,Closed,Early Settlement,Written Off,Bad Debt Write Off,Refinanced</List><LimitToList>true</LimitToList><MaxLength>0</MaxLength><Rows>8</Rows></Parameter><Parameter name="_PageStart3" type="PageStart"><Caption>Ranges</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /></Parameter><Parameter name="_SectionStart3" type="SectionStart"><Caption>Select any Range filters you require.</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><SectionColumns>1</SectionColumns></Parameter><Parameter name="AccountManagers" type="Range"><Caption>Account Managers</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Standard</RangeType><RangeLookupSource>AccountManagers</RangeLookupSource><RangeLookupSqlWhere /></Parameter><Parameter name="AccountTypes" type="Range"><Caption>Account Types</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Standard</RangeType><RangeLookupSource>AccountTypes</RangeLookupSource><RangeLookupSqlWhere /></Parameter><Parameter name="Clients" type="Range"><Caption>Clients</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText>This applies to the Main Client only unless you opt to Include All Clients</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Standard</RangeType><RangeLookupSource>Clients</RangeLookupSource><RangeLookupSqlWhere /></Parameter><Parameter name="ClientsIncludeAll" type="Boolean"><Caption>Include All Clients?</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value>False</Value><Visible>true</Visible><IconResourceId>Client</IconResourceId></Parameter><Parameter name="CreditRatings" type="Range"><Caption>Credit Ratings</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Database</RangeType><RangeLookupFieldList>CreditRating</RangeLookupFieldList><RangeLookupIdField>CreditRating</RangeLookupIdField><RangeLookupSource>Client</RangeLookupSource><RangeLookupSqlDistinct>Distinct</RangeLookupSqlDistinct><RangeLookupSqlWhere /><RangeLookupSqlOrderBy>CreditRating</RangeLookupSqlOrderBy></Parameter><Parameter name="Departments" type="Range"><Caption>Departments</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Standard</RangeType><RangeLookupSource>Departments</RangeLookupSource><RangeLookupSqlWhere /></Parameter><Parameter name="AccountLedgers" type="Range"><Caption>Ledgers</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText>Enter '[Default]' to use the Account Ledgers Range defined under User Preferences, Reporting</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value>[Default]</Value><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Standard</RangeType><RangeLookupSource>AccountLedgers</RangeLookupSource><RangeLookupSqlWhere /></Parameter><Parameter name="MonitorCategoriesA" type="Range"><Caption>Monitor Category A (Overdue)</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Standard</RangeType><RangeLookupSource>MonitorCategories</RangeLookupSource><RangeLookupSqlWhere /></Parameter><Parameter name="MonitorCategoriesB" type="Range"><Caption>Monitor Category B (Non Financial)</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Standard</RangeType><RangeLookupSource>MonitorCategories</RangeLookupSource><RangeLookupSqlWhere /></Parameter><Parameter name="PaymentMethods1" type="Range"><Caption>Payment Method (Incoming)</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Standard</RangeType><RangeLookupSource>PaymentMethods</RangeLookupSource><RangeLookupSqlWhere>[PaymentFlowDirection] = 0</RangeLookupSqlWhere></Parameter><Parameter name="ProductTypes" type="Range"><Caption>Product Types</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Standard</RangeType><RangeLookupSource>ProductTypes</RangeLookupSource><RangeLookupSqlWhere /></Parameter><Parameter name="Purposes" type="Range"><Caption>Purposes</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Database</RangeType><RangeLookupFieldList>Purpose</RangeLookupFieldList><RangeLookupIdField>Purpose</RangeLookupIdField><RangeLookupSource>Account</RangeLookupSource><RangeLookupSqlDistinct>Distinct</RangeLookupSqlDistinct><RangeLookupSqlWhere /><RangeLookupSqlOrderBy>Purpose</RangeLookupSqlOrderBy></Parameter><Parameter name="Regions" type="Range"><Caption>Regions</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Database</RangeType><RangeLookupFieldList>Region</RangeLookupFieldList><RangeLookupIdField>Region</RangeLookupIdField><RangeLookupSource>Account</RangeLookupSource><RangeLookupSqlDistinct>Distinct</RangeLookupSqlDistinct><RangeLookupSqlWhere /><RangeLookupSqlOrderBy>Region</RangeLookupSqlOrderBy></Parameter><Parameter name="Sources" type="Range"><Caption>Sources</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><RangeSingle>false</RangeSingle><RangeType>Database</RangeType><RangeLookupFieldList>Source</RangeLookupFieldList><RangeLookupIdField>Source</RangeLookupIdField><RangeLookupSource>Account</RangeLookupSource><RangeLookupSqlDistinct>Distinct</RangeLookupSqlDistinct><RangeLookupSqlWhere /><RangeLookupSqlOrderBy>Source</RangeLookupSqlOrderBy></Parameter><Parameter name="_PageStart4" type="PageStart"><Caption>Grouping</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /></Parameter><Parameter name="_SectionStart4" type="SectionStart"><Caption>Select any Grouping Levels you require.</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /><SectionColumns>1</SectionColumns></Parameter><Parameter name="Groupings" type="GroupingList"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>true</Visible><List>Account Manager,Account Type,Client,Close Method,Creation Method,Credit Rating,Department,Ledger,Payment Method (Incoming),Product Type,Purpose,Region,Source,Status</List><GroupingListShowPageBreakButton>true</GroupingListShowPageBreakButton></Parameter><Parameter name="_PageStart5" type="PageStart"><Caption>Custom</Caption><StandaloneOnly>false</StandaloneOnly><TooltipText /></Parameter><Parameter name="SqlOrderBy" type="Text"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>false</Visible><MaxLength>0</MaxLength><Rows>1</Rows></Parameter><Parameter name="SqlWhere" type="Text"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>false</Visible><MaxLength>0</MaxLength><Rows>1</Rows></Parameter><Parameter name="SqlFields" type="Text"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText>For fields comming from the Account table, prefix the field names with 'Account.' E.g. Account.ClientPk.</TooltipText><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>false</HideDescription><IndentLevel>0</IndentLevel><Mandatory>false</Mandatory><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value /><Visible>false</Visible><MaxLength>0</MaxLength><Rows>1</Rows></Parameter><Parameter name="GroupingsSummary" type="Boolean"><Caption /><StandaloneOnly>false</StandaloneOnly><TooltipText /><DefaultValueExpression /><Enabled>true</Enabled><HideDescription>true</HideDescription><IndentLevel>0</IndentLevel><NonPersistable>false</NonPersistable><ReadOnly>false</ReadOnly><ReadOnly2>false</ReadOnly2><Value>False</Value><Visible>true</Visible></Parameter></Parameters></ISParameterDefs></Parameters><Columns><finReportTemplateColumns version="1.00"><Column name="AccountId"><ColumnType>Code</ColumnType><DataField>AccountId</DataField><Heading>Code</Heading><HeadingColSpan>0</HeadingColSpan><HideRepeatingValueDataField /><HideWhenGrouped>true</HideWhenGrouped><HeadingShort /><MaxWidth>0</MaxWidth><MinWidth>0</MinWidth><OutputFormatSpecial>None</OutputFormatSpecial><PaddingRight>0</PaddingRight><ScaleWeight>0</ScaleWeight><CanGrow>true</CanGrow><SummaryType>None</SummaryType><TextAlign>Left</TextAlign><Visible>true</Visible><Width>1100</Width></Column><Column name="AccountName"><ColumnType>Text</ColumnType><DataField>AccountName</DataField><Heading>Name</Heading><HeadingColSpan>0</HeadingColSpan><HideRepeatingValueDataField /><HideWhenGrouped>true</HideWhenGrouped><HeadingShort /><MaxWidth>0</MaxWidth><MinWidth>0</MinWidth><OutputFormatSpecial>None</OutputFormatSpecial><PaddingRight>0</PaddingRight><ScaleWeight>10</ScaleWeight><CanGrow>false</CanGrow><SummaryType>None</SummaryType><TextAlign>Left</TextAlign><Visible>true</Visible><Width>-1</Width></Column><Column name="Balance"><ColumnType>Currency</ColumnType><DataField>Balance</DataField><Heading>Balance</Heading><HeadingColSpan>0</HeadingColSpan><HideRepeatingValueDataField /><HideWhenGrouped>true</HideWhenGrouped><HeadingShort /><MaxWidth>0</MaxWidth><MinWidth>0</MinWidth><OutputFormatSpecial>None</OutputFormatSpecial><PaddingRight>0</PaddingRight><ScaleWeight>2</ScaleWeight><CanGrow>true</CanGrow><OutputFormat>Currency</OutputFormat><SummaryType>Sum</SummaryType><TextAlign>Right</TextAlign><Visible>true</Visible><Width>1050</Width></Column><Column name="Interest"><ColumnType>Currency</ColumnType><DataField>Interest</DataField><Heading>Interest</Heading><HeadingColSpan>0</HeadingColSpan><HideRepeatingValueDataField /><HideWhenGrouped>false</HideWhenGrouped><HeadingShort /><MaxWidth>0</MaxWidth><MinWidth>0</MinWidth><OutputFormatSpecial>None</OutputFormatSpecial><PaddingRight>0</PaddingRight><ScaleWeight>2</ScaleWeight><CanGrow>false</CanGrow><OutputFormat>Currency</OutputFormat><SummaryType>Sum</SummaryType><TextAlign>Right</TextAlign><Visible>true</Visible><Width>1050</Width></Column><Column name="InterestEarned"><ColumnType>Currency</ColumnType><DataField>InterestEarned</DataField><Heading>Earned</Heading><HeadingColSpan>0</HeadingColSpan><HideRepeatingValueDataField /><HideWhenGrouped>false</HideWhenGrouped><HeadingShort /><MaxWidth>0</MaxWidth><MinWidth>0</MinWidth><OutputFormatSpecial>None</OutputFormatSpecial><PaddingRight>0</PaddingRight><ScaleWeight>2</ScaleWeight><CanGrow>false</CanGrow><OutputFormat>Currency</OutputFormat><SummaryType>Sum</SummaryType><TextAlign>Right</TextAlign><Visible>true</Visible><Width>1050</Width></Column><Column name="InterestUnearned"><ColumnType>Currency</ColumnType><DataField>InterestUnearned</DataField><Heading>Unearned</Heading><HeadingColSpan>0</HeadingColSpan><HideRepeatingValueDataField /><HideWhenGrouped>false</HideWhenGrouped><HeadingShort /><MaxWidth>0</MaxWidth><MinWidth>0</MinWidth><OutputFormatSpecial>None</OutputFormatSpecial><PaddingRight>0</PaddingRight><ScaleWeight>2</ScaleWeight><CanGrow>false</CanGrow><OutputFormat>Currency</OutputFormat><SummaryType>Sum</SummaryType><TextAlign>Right</TextAlign><Visible>true</Visible><Width>1050</Width></Column></finReportTemplateColumns></Columns></finReportTemplate>