<?xml version="1.0" encoding="UTF-8" ?>
<ActiveReportsLayout 
	GUIDLIB="{D1498769-8C22-4B59-B9EC-549A28EFBB6A}" GUIDREP="{3AC7052F-EAEA-4420-AF2E-3F5C45B76938}" 
	LICENSE="10000000"
	PrintWidth="10700"
	DocumentName="Client Labels"
	ScriptLang="VBScript"
>
<Watermark
		>
</Watermark>
<Script>
<![CDATA[' ******************************************************************
' Report - Client Labels (Not Overdue)
' ******************************************************************
' Notes/ Issues/ Outstanding etc
' Prints Lables for Clients who have an open Loan(s) not overdue.
' ******************************************************************
' Changes
' Date        By    Summary
' 20/12/2001  IS    Created
' ******************************************************************

Sub OnDataInitialize
		
	rpt.Fields.Add("LabelText")

End Sub

Sub OnFetchData(eof)

dim rst
dim SQLQuery 
dim strAddress
	
	' This report does not need to use a recordset, it is used to provide an example
	' of how to use 'CreateObject' to return a recordset.
	SQLQuery = "SELECT Name,Address,City,State,PostCode,Country FROM Client WHERE ClientId='" + rpt.Data.Recordset.Fields("GuarantorId") + "'"
	set rst = CreateObject("ADODB.RecordSet")
	rst.open SQLQuery, rpt.data.connectionstring

	strAddress = rst.Fields("Name")
	If len(rst.Fields("Address")) > 0 Then strAddress = strAddress + vbnewline + rst.Fields("Address")
	If len(rst.Fields("City")) > 0 Then strAddress = strAddress + vbnewline + rst.Fields("City")
	If len(rst.Fields("State")) > 0 Then strAddress = strAddress + vbnewline + rst.Fields("State")
	If len(rst.Fields("PostCode")) > 0 Then strAddress = strAddress + "    " + rst.Fields("PostCode")
	If len(rst.Fields("Country")) > 0 Then strAddress = strAddress + vbnewline + rst.Fields("Country")
	rpt.Fields("LabelText").Value = strAddress	
	rst.Close
	set rst = Nothing

End Sub

Sub OnReportStart

End Sub
]]></Script>
<PageSettings	LeftMargin="600"
	RightMargin="600"
	TopMargin="600"
	BottomMargin="600"
>
</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="PageHeader" Name="PageHeader"
		Height="195"
	>
	</Section>
	<Section Type="Detail" Name="Detail"
		Height="1800"
		ColumnCount="3"
		ColumnDirection="1"
	>
		<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 Guarantor.GuarantorId FROM Contract INNER JOIN Guarantor ON Contract.ContractId = Guarantor.ContractId WHERE Contract.Status=&apos;Open&apos; AND Contract.Type In(&apos;C&apos;,&apos;L&apos;,&apos;R&apos;) AND Guarantor.Type=&apos;Main&apos; AND ((SELECT Sum(Overdue) FROM Transactions WHERE Transactions.ContractId=Contract.ContractId AND Date&lt;{DateAsAt}) Is Null OR (SELECT Sum(Overdue) FROM Transactions WHERE Transactions.ContractId=Contract.ContractId AND Date&lt;{DateAsAt})&lt;=0) GROUP BY Guarantor.GuarantorId"
		LockType="1"
		>
		</Control>
		<Control 
		Type="AR.Field"
		Name="txtLabel"
		DataField="LabelText"
		Left="142"
		Top="142"
		Width="3189"
		Height="1559"
		Text="LabelText"
		ClassName="Normal"
		>
		</Control>
<Script>
<![CDATA[
Sub OnFormat

End Sub
]]></Script>
	</Section>
	<Section Type="PageFooter" Name="PageFooter"
		Height="195"
	>
	</Section>
</Sections>
</ActiveReportsLayout>
