<?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="IntelligenceInfoSubReport" pageWidth="2288" pageHeight="555" orientation="Landscape" columnWidth="2288" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="cb0e4f37-c786-4842-a1e7-dabbd047c92b">
	<property name="ireport.zoom" value="0.6830134553650705"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="INFORMATIONTYPE" class="java.lang.String"/>
	<parameter name="LangCD" class="java.lang.String"/>
	<parameter name="Serial_Number" class="java.lang.String"/>
	<parameter name="RegistrationNumber" class="java.lang.String"/>
	<parameter name="SubmittedTo" class="java.lang.String"/>
	<parameter name="FromDate" class="java.lang.String"/>
	<parameter name="ToDate" class="java.lang.String"/>
	<queryString>
		<![CDATA[SELECT distinct a.INT_INFO_CD,
 DATE_FORMAT(a.INFORM_REC_DATE,'%d/%m/%Y %h:%i %p')AS INFORMRECDATE,
 DATE_FORMAT(a.RECORD_CREATED_ON,'%d/%m/%Y ')AS datetop,
 a.ENTRY_DATE,a.INFO_TYPE_CD,
 m.OFFICE_TYPE_DESC,
 case WHEN A.STATUS=1 AND a.Lang_CD=99 THEN 'Prepared'
	             WHEN A.STATUS=1 AND a.Lang_CD=6 THEN N'तैयार'
	             WHEN A.STATUS=2 AND a.Lang_CD=99 THEN 'UnderPrepared'
	             WHEN A.STATUS=2 AND a.Lang_CD=6 THEN N'तहत तैयार'
                END as Status,
 a.INFORM_REC_DATE,
 a.SUBMITTED_TO,a.STATUS,a.INFORMATION_RECEIVED
 FROM fr_tb_intelligence_info_t a
 left join m_office_types m on m.OFFICE_TYPE_CD=a.SUBMITTED_TO
 left join m_police_station pst ON pst.PS_CD = a.PS_CD AND pst.LANG_CD = a.LANG_CD
 WHERE  a.Lang_CD =  $P{LangCD}
  and (a.INFO_TYPE_CD like  $P{INFORMATIONTYPE} OR $P{INFORMATIONTYPE} =0  OR $P{INFORMATIONTYPE} IS NULL)
and (a.SUBMITTED_TO like $P{SubmittedTo} OR $P{SubmittedTo} =0  OR $P{SubmittedTo} IS NULL)
and a.INT_INFO_CD like $P{RegistrationNumber}
and DATE(a.RECORD_CREATED_ON) between $P{FromDate} and $P{ToDate}
 order by a.INT_INFO_CD desc]]>
	</queryString>
	<field name="INT_INFO_CD" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="INFORMRECDATE" class="java.lang.String"/>
	<field name="datetop" class="java.lang.String"/>
	<field name="ENTRY_DATE" class="java.sql.Timestamp">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="INFO_TYPE_CD" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="OFFICE_TYPE_DESC" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="Status" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="INFORM_REC_DATE" class="java.sql.Timestamp">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="SUBMITTED_TO" class="java.lang.Integer">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="INFORMATION_RECEIVED" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<detail>
		<band height="100" splitType="Stretch">
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="94e5538f-4398-4b4a-8a69-f5e4c9e72133" stretchType="RelativeToTallestObject" x="121" y="0" width="451" height="100" isPrintWhenDetailOverflows="true"/>
				<box>
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<textElement>
					<font size="30"/>
					<paragraph leftIndent="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{INFORMRECDATE}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="b7d7eb73-5abe-4767-83b0-262e38449857" stretchType="RelativeToTallestObject" x="572" y="0" width="570" height="100" isPrintWhenDetailOverflows="true"/>
				<box>
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<textElement>
					<font size="30"/>
					<paragraph leftIndent="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{OFFICE_TYPE_DESC}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="d9087357-51ca-475b-96f9-f97a0670224e" stretchType="RelativeToTallestObject" x="1142" y="0" width="572" height="100" isPrintWhenDetailOverflows="true"/>
				<box>
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<textElement>
					<font size="30"/>
					<paragraph leftIndent="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{Status}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement uuid="ca8051b9-cd4b-4a7a-a13e-9073640f46ee" stretchType="RelativeToTallestObject" x="1714" y="0" width="572" height="100" isPrintWhenDetailOverflows="true"/>
				<box>
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<textElement>
					<font size="30"/>
					<paragraph leftIndent="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{INFORMATION_RECEIVED}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement uuid="76c0901d-8e46-457d-b591-ef605ea0b1f9" stretchType="RelativeToTallestObject" x="0" y="0" width="121" height="100"/>
				<box>
					<pen lineWidth="1.0"/>
					<topPen lineWidth="1.0"/>
					<leftPen lineWidth="1.0"/>
					<bottomPen lineWidth="1.0"/>
					<rightPen lineWidth="1.0"/>
				</box>
				<textElement>
					<font size="30"/>
					<paragraph leftIndent="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$P{Serial_Number}+"."+$V{REPORT_COUNT}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
</jasperReport>
