<?xml version="1.0" encoding="UTF-8" ?>
<ActiveReportsLayout 
	GUIDLIB="{0858506E-1FB2-44AF-A03A-7B256CBAFC08}" GUIDREP="{2A7C9EF4-BFB4-409D-87E8-EB600A95A019}" 
	LICENSE="10000000"
	PrintWidth="11000"
	ShowParamUI="0"
	DocumentName="ActiveReports Document"
	ScriptLang="VBScript"
>
<Watermark
		>
</Watermark>
<Script>
<![CDATA[option explicit

private finBL
private mCounter
private mSecurities


Sub OnReportStart
	
dim rst 
dim ContractType

  ' Get business layer
  Set finBL = vbCode.finPOWERBL()

  ' Reset balance
  mcounter = 1
  rpt.Detail.backstyle = 1

  ' Get securities
  set mSecurities = Loan.SecurityStatement.Securities

  ' Hide if nothing to show
  rpt.ReportHeader.visible = (mSecurities.count <> 0)
  rpt.Detail.Visible = rpt.ReportHeader.visible
  rpt.ReportFooter.visible = rpt.ReportHeader.visible

End Sub

Sub OnDataInitialize
	
	if rpt.fields.count = 0 then
        rpt.fields.Add "Type"
        rpt.fields.Add "Reference"
        rpt.fields.Add "Number"
        rpt.fields.Add "Description"
        rpt.fields.Add "Value"
        rpt.fields.Add "ReviewDate"
	end if

End Sub

Sub OnFetchData(eof)
	
	if mcounter <= mSecurities.count then
		eof = false
		
		With mSecurities(mCounter)
		      rpt.Fields("Type").value = .SecurityTypeId
		      rpt.Fields("Reference").value = .Reference
		      rpt.Fields("Description").value = .Description
		      If finBL.SecurityTypes(.SecurityTypeId).EntryType = 5 Then ' iseSecurityEntryTypeInsurance
		        rpt.Fields("Number").value = .InsurancePolicy
		        rpt.Fields("Value").value = ""
		        rpt.Fields("ReviewDate").value = .InsuranceRenewalDate
		      Else
		        rpt.Fields("Number").value = .SerialNo
		        rpt.Fields("Value").value = .Value
		        rpt.Fields("ReviewDate").value = .ValuationReviewDate
		      End If
		End With

		mcounter = mcounter + 1
		
		rpt.data.recordset.movefirst
	else
		eof = true
	end if

End Sub]]></Script>
<PageSettings>
</PageSettings>
<StyleSheet>
	<Style Name="Normal"
	Value="font-family: Arial; font-style: normal; font-variant: inherit; font-weight: normal; font-size: 10pt; font-size-adjust: inherit; font-stretch: inherit; color: rgb(0,0,0); background-color: rgb(255,255,255); background-image: inherit; background-repeat: inherit; background-attachment: inherit; background-x-position: inherit; background-y-position: inherit; opacity: inherit; word-spacing: inherit; letter-spacing: inherit; text-decoration: none; vertical-align: inherit; text-transform: inherit; text-align: inherit; text-indent: inherit; unicode-bidi: inherit; line-height: inherit; white-space: inherit; ddo-can-grow: inherit; ddo-can-shrink: inherit; ddo-char-set: 0; "
	/>
	<Style Name="Heading1"
	Value="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: bold; font-size: 16pt; font-size-adjust: inherit; font-stretch: inherit; "
	/>
	<Style Name="Heading2"
	Value="font-family: Times New Roman; font-style: italic; font-variant: inherit; font-weight: bold; font-size: 14pt; font-size-adjust: inherit; font-stretch: inherit; "
	/>
	<Style Name="Heading3"
	Value="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: bold; font-size: 13pt; font-size-adjust: inherit; font-stretch: inherit; "
	/>
	<Style Name="Heading4"
	/>
</StyleSheet>
<Sections>
	<Section Type="ReportHeader" Name="ReportHeader"
		Height="540"
	>
		<Control 
		Type="AR.Label"
		Name="lblCreated"
		Left="0"
		Top="315"
		Width="10995"
		Height="195"
		BorderBottomStyle="1"
		BorderBottomColor="0"
		ClassName="Normal"
		Style="font-size: 8.5pt; font-weight: bold; "
		>
		</Control>
		<Control 
		Type="AR.Label"
		Name="lblType"
		Left="0"
		Top="315"
		Width="795"
		Height="195"
		Caption="Type"
		ClassName="Normal"
		Style="font-size: 8pt; font-weight: bold; text-align: left; "
		>
		</Control>
		<Control 
		Type="AR.Label"
		Name="lblSerialNumber"
		Left="3000"
		Top="315"
		Width="2175"
		Height="195"
		Caption="Serial Number"
		ClassName="Normal"
		Style="font-size: 8pt; font-weight: bold; text-align: left; "
		>
		</Control>
		<Control 
		Type="AR.Label"
		Name="lblHeading"
		Left="30"
		Top="15"
		Width="10910"
		Height="235"
		BorderTopStyle="1"
		BorderTopColor="0"
		BorderLeftStyle="1"
		BorderLeftColor="0"
		BorderRightStyle="1"
		BorderRightColor="0"
		BorderBottomStyle="1"
		BorderBottomColor="0"
		BorderShadow="1"
		Caption="Securities"
		ClassName="Normal"
		Style="font-weight: bold; "
		>
		</Control>
		<Control 
		Type="AR.Label"
		Name="lblDesc"
		Left="5175"
		Top="315"
		Width="3180"
		Height="195"
		Caption="Description"
		ClassName="Normal"
		Style="font-size: 8pt; font-weight: bold; text-align: left; "
		>
		</Control>
		<Control 
		Type="AR.Label"
		Name="lblReview"
		Left="9930"
		Top="315"
		Width="1000"
		Height="195"
		Caption="Review"
		ClassName="Normal"
		Style="font-size: 8pt; font-weight: bold; text-align: right; "
		>
		</Control>
		<Control 
		Type="AR.Label"
		Name="lblValue"
		Left="8385"
		Top="315"
		Width="1560"
		Height="195"
		Caption="Value"
		ClassName="Normal"
		Style="font-size: 8pt; font-weight: bold; text-align: right; "
		>
		</Control>
		<Control 
		Type="AR.Label"
		Name="Label1"
		Left="795"
		Top="315"
		Width="2205"
		Height="195"
		Caption="Reference"
		ClassName="Normal"
		Style="font-size: 8pt; font-weight: bold; text-align: left; "
		>
		</Control>
<Script>
<![CDATA[
Sub OnFormat

End Sub
]]></Script>
	</Section>
	<Section Type="Detail" Name="Detail"
		Height="200"
	>
		<Control 
		Type="AR.DataControl"
		Name="Data"
		Left="-2000"
		Top="-2000"
		Width="1500"
		Height="360"
		Visible="0"
		Tag="C:\Program Files\Intersoft\finPOWER5\SYSTEM.MDW?C:\Program Files\Intersoft\finPOWER5\finDEMO.mdb"
		ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Intersoft\finPOWER5\finDEMO.mdb;User Id=User;Password=user;Jet OLEDB:System database=C:\Program Files\Intersoft\finPOWER5\SYSTEM.MDW"
		RecordSource="SELECT ContractId FROM Contract WHERE ContractId=&apos;&lt;%ContractId%&gt;&apos;"
		LockType="1"
		>
		</Control>
		<Control 
		Type="AR.Field"
		Name="txtSerialNumber"
		DataField="Number"
		Left="3000"
		Top="0"
		Width="2175"
		Height="195"
		Text="SerialNo"
		CanShrink="-1"
		ClassName="Normal"
		Style="font-size: 8pt; text-align: left; "
		>
		</Control>
		<Control 
		Type="AR.Field"
		Name="txtType"
		DataField="Type"
		Left="0"
		Top="0"
		Width="800"
		Height="190"
		Text="Type"
		CanShrink="-1"
		ClassName="Normal"
		Style="font-size: 8pt; text-align: left; "
		>
		</Control>
		<Control 
		Type="AR.Field"
		Name="txtReference"
		DataField="Reference"
		Left="800"
		Top="0"
		Width="2200"
		Height="190"
		Text="Reference"
		CanShrink="-1"
		ClassName="Normal"
		Style="font-size: 8pt; text-align: left; "
		>
		</Control>
		<Control 
		Type="AR.Field"
		Name="dateReview"
		DataField="ReviewDate"
		Left="9930"
		Top="0"
		Width="1005"
		Height="195"
		Text="Review"
		OutputFormat="dd/mm/yyyy"
		CanShrink="-1"
		ClassName="Normal"
		Style="font-size: 8pt; text-align: right; "
		>
		</Control>
		<Control 
		Type="AR.Field"
		Name="txtDescription"
		DataField="Description"
		Left="5175"
		Top="0"
		Width="3180"
		Height="195"
		Text="Description"
		CanShrink="-1"
		ClassName="Normal"
		Style="font-size: 8pt; text-align: left; "
		>
		</Control>
		<Control 
		Type="AR.Field"
		Name="txtValue"
		DataField="Value"
		Left="8385"
		Top="0"
		Width="1560"
		Height="195"
		Text="Value"
		OutputFormat="#,##0.00"
		CanShrink="-1"
		ClassName="Normal"
		Style="font-size: 8pt; text-align: right; "
		>
		</Control>
<Script>
<![CDATA[
Sub OnFormat

	' Format oddline feature
	rpt.Sections("Detail").backstyle = 1 - rpt.Sections("Detail").backstyle

End Sub]]></Script>
	</Section>
	<Section Type="ReportFooter" Name="ReportFooter"
		Height="60"
	>
	</Section>
</Sections>
</ActiveReportsLayout>
