<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.20.0.final using JasperReports Library version 6.20.0-2bc7ab61c56f459e8176eb05c7705e145cd400ad  -->
<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="lista_ganador" pageWidth="792" pageHeight="612" orientation="Landscape" columnWidth="722" leftMargin="35" rightMargin="35" topMargin="20" bottomMargin="10" uuid="6eb66b6b-9a20-4723-a05c-9f52ec31a413">
	<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
	<property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w1" value="656"/>
	<property name="com.jaspersoft.studio.property.dataset.dialog.DatasetDialog.sash.w2" value="330"/>
	<property name="com.jaspersoft.studio.report.description" value=""/>
	<property name="com.jaspersoft.studio.data.defaultdataadapter" value="mysql orodiint_bsn"/>
	<property name="com.jaspersoft.studio.unit." value="pixel"/>
	<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
	<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
	<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
	<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
	<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
	<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
	<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
	<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
	<queryString language="SQL">
		<![CDATA[SELECT
	
ga.id_ganador as id,

	ga.fecha,


ROW_NUMBER() OVER (
		ORDER BY ga.id_ganador
	) id_ganador,
	
	
	
	
	
	CONCAT( ga.nombres, ' ', ga.apellido_paterno, ' ', ga.apellido_materno ) AS Ganador,
	ga.ci,
	pr.detalle AS premio_detalle,
	ga.telefono,
	ga.placa,
	pre.cantidad_max AS M3_GNV,
	tv.nombre AS tipo_vehiculo,
	pro.nombre AS promocion,
	pr.premio,
	l.alias AS procedencia 
FROM  
	pro_ganador AS ga
	INNER JOIN pro_participante AS par ON ga.placa = par.placa
	INNER JOIN pro_det_premio AS pre ON ga.premio = pre.id_det_premio
	INNER JOIN pro_premio AS pr ON pre.id_premio = pr.id_premio
	INNER JOIN aux AS tv ON par.tipo_vehiculo = tv.id_aux
	INNER JOIN promocion AS pro ON ga.id_promocion = pro.id_promocion
	LEFT JOIN aux AS l ON ga.procedencia = l.id_aux
	INNER JOIN promocion AS pro2 ON par.id_promocion = pro2.id_promocion
WHERE
	( pro2.estado = 1 AND pro.estado = 1 ) 
ORDER BY
ga.id_ganador ASC]]>
	</queryString>
	<field name="id" class="java.lang.Integer">
		<property name="com.jaspersoft.studio.field.name" value="id_ganador"/>
		<property name="com.jaspersoft.studio.field.label" value="id"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="pro_ganador"/>
	</field>
	<field name="fecha" class="java.sql.Timestamp">
		<property name="com.jaspersoft.studio.field.name" value="fecha"/>
		<property name="com.jaspersoft.studio.field.label" value="fecha"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="pro_ganador"/>
	</field>
	<field name="id_ganador" class="java.math.BigInteger">
		<property name="com.jaspersoft.studio.field.name" value="id_ganador"/>
		<property name="com.jaspersoft.studio.field.label" value="id_ganador"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="pro_ganador"/>
	</field>
	<field name="Ganador" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="Ganador"/>
		<property name="com.jaspersoft.studio.field.label" value="Ganador"/>
	</field>
	<field name="ci" class="java.math.BigDecimal">
		<property name="com.jaspersoft.studio.field.name" value="ci"/>
		<property name="com.jaspersoft.studio.field.label" value="ci"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="pro_ganador"/>
	</field>
	<field name="premio_detalle" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="detalle"/>
		<property name="com.jaspersoft.studio.field.label" value="premio_detalle"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="pro_premio"/>
	</field>
	<field name="telefono" class="java.math.BigDecimal">
		<property name="com.jaspersoft.studio.field.name" value="telefono"/>
		<property name="com.jaspersoft.studio.field.label" value="telefono"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="pro_ganador"/>
	</field>
	<field name="placa" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="placa"/>
		<property name="com.jaspersoft.studio.field.label" value="placa"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="pro_ganador"/>
	</field>
	<field name="M3_GNV" class="java.math.BigDecimal">
		<property name="com.jaspersoft.studio.field.name" value="cantidad_max"/>
		<property name="com.jaspersoft.studio.field.label" value="M3_GNV"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="pro_det_premio"/>
	</field>
	<field name="tipo_vehiculo" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="nombre"/>
		<property name="com.jaspersoft.studio.field.label" value="tipo_vehiculo"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="aux"/>
	</field>
	<field name="promocion" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="nombre"/>
		<property name="com.jaspersoft.studio.field.label" value="promocion"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="promocion"/>
	</field>
	<field name="premio" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="premio"/>
		<property name="com.jaspersoft.studio.field.label" value="premio"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="pro_premio"/>
	</field>
	<field name="procedencia" class="java.lang.String">
		<property name="com.jaspersoft.studio.field.name" value="alias"/>
		<property name="com.jaspersoft.studio.field.label" value="procedencia"/>
		<property name="com.jaspersoft.studio.field.tree.path" value="aux"/>
	</field>
	<title>
		<band height="73">
			<staticText>
				<reportElement x="0" y="3" width="719" height="20" uuid="304bd5d8-2081-4065-8873-0fdff5dbe887">
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center">
					<font size="13" isBold="true"/>
				</textElement>
				<text><![CDATA[LISTA DE GANADORES PROMOCION:]]></text>
			</staticText>
			<textField>
				<reportElement x="0" y="24" width="719" height="20" uuid="84b3e537-788d-4578-b033-a7ac8f6955cd">
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center">
					<font size="13" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{promocion}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<columnHeader>
		<band height="40">
			<staticText>
				<reportElement x="0" y="0" width="20" height="35" uuid="a92665fe-cf8a-478a-8513-afcc8a2e07a2">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ab11e593-356c-47d4-85cc-37b33c288aa5"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement verticalAlignment="Top">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Nro]]></text>
			</staticText>
			<staticText>
				<reportElement x="200" y="0" width="154" height="35" uuid="6fa8418e-8301-4d5a-b15d-c505b31b0cb7">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="1ec00a24-cfce-4023-899c-20976b8dbee0"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Left" verticalAlignment="Top">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Nombre y Apellido del Ganador]]></text>
			</staticText>
			<staticText>
				<reportElement x="359" y="0" width="60" height="35" uuid="65f5abd7-e653-4344-9012-61a17864b43e">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="befa3879-c7f2-4125-b12b-66bee4c1a025"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Top">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Numero de C.I.]]></text>
			</staticText>
			<staticText>
				<reportElement x="425" y="0" width="73" height="35" uuid="cdceaeaf-1b2e-487a-bb7f-db28155870bf">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="9e93af9b-0aa1-45a8-b0b8-3cb0c1206f6a"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Top">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Premio Entregado]]></text>
			</staticText>
			<staticText>
				<reportElement x="505" y="0" width="55" height="35" uuid="b09d543b-055d-4c15-a59d-986c74a36db2">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="4f5f14a2-634f-47dc-b272-6093e6975afa"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Top">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Numero de Telefono]]></text>
			</staticText>
			<staticText>
				<reportElement x="568" y="0" width="43" height="35" uuid="0210f2f9-8b40-4a5c-97c6-1e9160bceb53">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="fdabbdce-1f05-451f-8cae-62f6bb648edd"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Top">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Numero de Placa]]></text>
			</staticText>
			<staticText>
				<reportElement x="618" y="0" width="70" height="35" uuid="7d51313b-7c6a-4957-943e-8ac78f05fdbd">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f0c9446a-33b0-4878-870c-cf8062463b63"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Top">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Tipo Vehiculo]]></text>
			</staticText>
			<staticText>
				<reportElement x="694" y="0" width="28" height="35" uuid="86d60e6f-a569-41e6-8c04-99b1f2dcd917">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="9a70d810-f550-4636-9f48-b34e3bb78fa2"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Top">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[M3  GNV]]></text>
			</staticText>
			<staticText>
				<reportElement x="23" y="0" width="160" height="35" uuid="efe57d35-5fa3-4592-8bd4-4850e5cdccb8">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="24f87530-c2d6-4730-8862-2baa49d75b64"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center" verticalAlignment="Top">
					<font size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Lugar y fecha de Entrega del Premio]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="26">
			<property name="com.jaspersoft.studio.unit.height" value="px"/>
			<textField>
				<reportElement x="0" y="1" width="15" height="15" uuid="b360101c-4168-40b1-8b99-b1a38a8047a4">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="ab11e593-356c-47d4-85cc-37b33c288aa5"/>
					<property name="com.jaspersoft.studio.unit.y" value="px"/>
					<property name="com.jaspersoft.studio.unit.x" value="pixel"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
					<property name="com.jaspersoft.studio.unit.width" value="px"/>
				</reportElement>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{id_ganador}]]></textFieldExpression>
			</textField>
			<textField textAdjust="StretchHeight">
				<reportElement x="209" y="1" width="144" height="15" uuid="0fb82389-ce80-48be-903b-88b328d2181d">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="1ec00a24-cfce-4023-899c-20976b8dbee0"/>
					<property name="com.jaspersoft.studio.unit.width" value="px"/>
				</reportElement>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{Ganador}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="360" y="1" width="58" height="15" uuid="a3146062-0ff2-4d1a-a7a5-5beeae1e0a91">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="befa3879-c7f2-4125-b12b-66bee4c1a025"/>
					<property name="com.jaspersoft.studio.unit.width" value="px"/>
				</reportElement>
				<textElement textAlignment="Center">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{ci}  + "-"+$F{procedencia}]]></textFieldExpression>
			</textField>
			<textField textAdjust="StretchHeight">
				<reportElement x="446" y="1" width="52" height="15" uuid="1f6ac6aa-ce55-453f-9a07-d09a7990c332">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="9e93af9b-0aa1-45a8-b0b8-3cb0c1206f6a"/>
					<property name="com.jaspersoft.studio.unit.width" value="px"/>
				</reportElement>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{premio}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="509" y="1" width="48" height="15" uuid="f1c5a633-23f2-46a1-ba1d-0cd7f8c257a9">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="4f5f14a2-634f-47dc-b272-6093e6975afa"/>
					<property name="com.jaspersoft.studio.unit.width" value="px"/>
				</reportElement>
				<textElement textAlignment="Center">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{telefono}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="572" y="1" width="37" height="15" uuid="e525dff9-602d-4b09-b660-f5eedae98946">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="fdabbdce-1f05-451f-8cae-62f6bb648edd"/>
					<property name="com.jaspersoft.studio.unit.y" value="px"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{placa}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="618" y="1" width="74" height="24" uuid="8cc35bd5-a2da-4ef4-bd23-643f67e2fe0b">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="f0c9446a-33b0-4878-870c-cf8062463b63"/>
					<property name="com.jaspersoft.studio.unit.y" value="px"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{tipo_vehiculo}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="692" y="1" width="26" height="15" uuid="ad9b1453-7743-49ec-89d6-31412fac9ccc">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="9a70d810-f550-4636-9f48-b34e3bb78fa2"/>
					<property name="com.jaspersoft.studio.unit.y" value="px"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{M3_GNV}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="23" y="1" width="160" height="12" uuid="b181b287-652a-4ea5-94c5-b5781e791198">
					<property name="com.jaspersoft.studio.unit.y" value="px"/>
					<property name="com.jaspersoft.studio.unit.width" value="px"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement>
					<font size="7"/>
				</textElement>
				<text><![CDATA[AV. BARRIENTOS KM16  ZONA VILLA OBRAJES]]></text>
			</staticText>
			<textField textAdjust="StretchHeight" pattern="d/M/yyyy">
				<reportElement x="23" y="13" width="160" height="12" uuid="ae5244d2-97fe-45bb-ba72-19ae35db3000">
					<property name="com.jaspersoft.studio.spreadsheet.connectionID" value="24f87530-c2d6-4730-8862-2baa49d75b64"/>
					<property name="com.jaspersoft.studio.unit.width" value="px"/>
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement textAlignment="Center">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{fecha}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band height="27">
			<textField pattern="d/M/yyyy h:mm a">
				<reportElement x="563" y="14" width="80" height="10" uuid="e4550db0-5ff8-47e2-92a8-f39375b0c456">
					<property name="com.jaspersoft.studio.unit.height" value="px"/>
				</reportElement>
				<textElement verticalAlignment="Middle">
					<font fontName="Tahoma" size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="519" y="14" width="44" height="10" uuid="d1300db4-291a-4fdf-b4b5-68a786fe21cb"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font fontName="Tahoma" size="7"/>
				</textElement>
				<text><![CDATA[Impreso el :    ]]></text>
			</staticText>
			<textField>
				<reportElement x="518" y="3" width="100" height="10" uuid="16e49f06-2324-410b-9614-4b42038b7840"/>
				<textElement textAlignment="Right">
					<font size="6"/>
				</textElement>
				<textFieldExpression><![CDATA["Pagina " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="618" y="3" width="100" height="10" uuid="c40679bb-ad59-434e-b7eb-3c5bf3b8c805"/>
				<textElement textAlignment="Left">
					<font size="6"/>
				</textElement>
				<textFieldExpression><![CDATA[" de " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
	<summary>
		<band height="50"/>
	</summary>
</jasperReport>
