<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="IP Inventory" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<queryString language="SQL">
		<![CDATA[SELECT 
    interface_address_list.ip_addr AS interfaces_ip_addr,
    interface_address_list.ip_netmask AS interfaces_ip_netmask,
    object_properties.name AS object_properties_name,
    interfaces.node_id AS interfaces_node_id
FROM
    object_properties
        INNER JOIN
    interfaces ON object_properties.object_id = interfaces.node_id
        INNER JOIN
    interface_address_list ON interface_address_list.iface_id = interfaces.id
ORDER BY interfaces_node_id , interfaces_ip_addr]]>
	</queryString>
	<field name="interfaces_ip_addr" class="java.lang.String"/>
	<field name="interfaces_ip_netmask" class="java.lang.String"/>
	<field name="object_properties_name" class="java.lang.String"/>
	<field name="interfaces_node_id" class="java.lang.Integer"/>
	<group name="interfaces_node_id">
		<groupExpression><![CDATA[$F{interfaces_node_id}]]></groupExpression>
		<groupHeader>
			<band height="20">
				<textField>
					<reportElement x="0" y="0" width="555" height="20"/>
					<textElement>
						<font size="14" isBold="true"/>
					</textElement>
					<textFieldExpression><![CDATA[$F{object_properties_name}]]></textFieldExpression>
				</textField>
			</band>
		</groupHeader>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<detail>
		<band height="20" splitType="Stretch">
			<textField>
				<reportElement x="20" y="0" width="143" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$F{interfaces_ip_addr}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="163" y="0" width="143" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[$F{interfaces_ip_netmask}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band height="21">
			<line>
				<reportElement x="0" y="0" width="555" height="1"/>
			</line>
			<textField pattern="dd/MM/yyyy HH:mm:ss">
				<reportElement positionType="FixRelativeToBottom" x="0" y="1" width="100" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement positionType="FixRelativeToBottom" x="435" y="1" width="80" height="20"/>
				<textElement textAlignment="Right"/>
				<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement positionType="FixRelativeToBottom" x="515" y="1" width="40" height="20"/>
				<textElement/>
				<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
</jasperReport>
