src/org/openbravo/erpCommon/ad_reports/ReportGuaranteeDateJR.jrxml
author David Baz Fayos <david.baz@openbravo.com>
Tue, 27 May 2008 15:26:10 +0000
changeset 1044 8691bbc94032
parent 0 0247c26f10c6
child 2199 efd783b991af
permissions -rw-r--r--
Removed old frame parameter of windowTableId
<?xml version="1.0" encoding="UTF-8"  ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
		 name="ReportGuaranteeDateJR"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="595"
		 pageHeight="842"
		 columnWidth="535"
		 columnSpacing="0"
		 leftMargin="30"
		 rightMargin="30"
		 topMargin="20"
		 bottomMargin="20"
		 whenNoDataType="NoPages"
		 isTitleNewPage="false"
		 isSummaryNewPage="false">
	<property name="ireport.scriptlethandling" value="0" />
	<property name="ireport.encoding" value="UTF-8" />
	<import value="java.util.*" />
	<import value="net.sf.jasperreports.engine.*" />
	<import value="net.sf.jasperreports.engine.data.*" />

	<style 
		name="default"
		isDefault="false"
		vAlign="Middle"
		fontName="Bitstream Vera Sans"
		fontSize="10"
	/>
	<style 
		name="Report_Title"
		isDefault="false"
		leftPadding="5"
		fontName="Bitstream Vera Sans"
		fontSize="18"
	/>
	<style 
		name="Report_Subtitle"
		isDefault="false"
		forecolor="#555555"
		leftPadding="5"
		fontName="Bitstream Vera Sans"
		fontSize="14"
	/>
	<style 
		name="Total_Field"
		isDefault="false"
		mode="Opaque"
		forecolor="#000000"
		backcolor="#CCCCCC"
		vAlign="Middle"
		leftPadding="5"
	/>
	<style 
		name="Detail_Header"
		isDefault="false"
		mode="Opaque"
		forecolor="#FFFFFF"
		backcolor="#555555"
		vAlign="Middle"
		leftBorder="1Point"
		leftBorderColor="#FFFFFF"
		leftPadding="5"
		rightBorder="1Point"
		rightBorderColor="#FFFFFF"
	/>
	<style 
		name="GroupHeader_DarkGray"
		isDefault="false"
		mode="Opaque"
		forecolor="#FFFFFF"
		backcolor="#555555"
		vAlign="Middle"
		leftPadding="5"
		fontName="Bitstream Vera Sans"
		fontSize="14"
	/>
	<style 
		name="GroupHeader_Gray"
		isDefault="false"
		mode="Opaque"
		backcolor="#999999"
	/>
	<style 
		name="Detail_Line"
		isDefault="false"
	>

		<conditionalStyle>
			<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==1)]]></conditionExpression>
			<style 
				name="Detail_Line"
				isDefault="false"
				mode="Opaque"
				backcolor="#CCCCCC"
			/>
		</conditionalStyle>
	</style>
	<style 
		name="Total_Gray"
		isDefault="false"
		mode="Opaque"
		forecolor="#000000"
		backcolor="#CCCCCC"
	/>

	<parameter name="ATTACH" isForPrompting="false" class="java.lang.String"/>
	<parameter name="BASE_WEB" isForPrompting="false" class="java.lang.String"/>
	<parameter name="BASE_DESIGN" isForPrompting="false" class="java.lang.String"/>
	<parameter name="LANGUAGE" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["en_US"]]></defaultValueExpression>
	</parameter>
	<parameter name="USER_CLIENT" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["(1000000)"]]></defaultValueExpression>
	</parameter>
	<parameter name="USER_ORG" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["(0)"]]></defaultValueExpression>
	</parameter>
	<parameter name="REPORT_TITLE" isForPrompting="false" class="java.lang.String"/>
	<parameter name="REPORT_SUBTITLE" isForPrompting="false" class="java.lang.String"/>
	<parameter name="NUMBERFORMAT" isForPrompting="false" class="java.text.DecimalFormat">
		<defaultValueExpression ><![CDATA[new DecimalFormat()]]></defaultValueExpression>
	</parameter>
	<parameter name="LOCALE" isForPrompting="false" class="java.util.Locale">
		<defaultValueExpression ><![CDATA[new Locale("en","US")]]></defaultValueExpression>
	</parameter>
	<queryString><![CDATA[SELECT M_PRODUCT.NAME, C_BPARTNER.NAME AS PARTNERNAME, M_ATTRIBUTESETINSTANCE.GUARANTEEDATE AS GUARANTEEDATE, S.QTYONHAND  AS MOVEMENTQTY, C1.NAME AS UOM,
        (CASE WHEN S.M_PRODUCT_UOM_ID IS NULL THEN (CASE C1.C_UOM_ID WHEN 1000001 THEN NULL ELSE ((CASE WHEN M_PRODUCT.WEIGHT=0 THEN NULL WHEN M_PRODUCT.WEIGHT IS NULL THEN NULL ELSE M_PRODUCT.WEIGHT*S.QTYONHAND END)) END) ELSE S.QTYORDERONHAND END) AS WEIGHT, C2.NAME AS UOM2
        FROM M_STORAGE_DETAIL S left join M_PRODUCT on S.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
                                left join M_PRODUCT_UOM on S.M_PRODUCT_UOM_ID = M_PRODUCT_UOM.M_PRODUCT_UOM_ID
                                left join C_BPARTNER on M_PRODUCT.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID 
                                left join C_UOM C2 on M_PRODUCT_UOM.C_UOM_ID = C2.C_UOM_ID
                                left join M_ATTRIBUTESETINSTANCE on S.M_ATTRIBUTESETINSTANCE_ID =  M_ATTRIBUTESETINSTANCE.M_ATTRIBUTESETINSTANCE_ID, 
             C_UOM C1, M_LOCATOR, M_WAREHOUSE
        WHERE S.M_LOCATOR_ID = M_LOCATOR.M_LOCATOR_ID
        AND M_LOCATOR.M_WAREHOUSE_ID = M_WAREHOUSE.M_WAREHOUSE_ID
        AND S.C_UOM_ID = C1.C_UOM_ID      
        AND S.QTYONHAND <>0 
        ORDER BY C_BPARTNER.NAME, GUARANTEEDATE DESC]]></queryString>

	<field name="NAME" class="java.lang.String"/>
	<field name="PARTNERNAME" class="java.lang.String"/>
	<field name="GUARANTEEDATE" class="java.util.Date"/>
	<field name="MOVEMENTQTY" class="java.math.BigDecimal"/>
	<field name="UOM" class="java.lang.String"/>
	<field name="WEIGHT" class="java.math.BigDecimal"/>
	<field name="UOM2" class="java.lang.String"/>

	<variable name="UOM2" class="java.lang.String" resetType="Report" calculation="Nothing">
		<variableExpression><![CDATA[($F{WEIGHT}!=null && $F{UOM2} == null)?"Kgs":$F{UOM2}]]></variableExpression>
	</variable>

		<group  name="PARTNERNAME" isReprintHeaderOnEachPage="true" >
			<groupExpression><![CDATA[$F{PARTNERNAME}]]></groupExpression>
			<groupHeader>
			<band height="50"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						style="Detail_Header"
						x="113"
						y="34"
						width="215"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Description]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Header"
						x="0"
						y="0"
						width="535"
						height="23"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans" size="12"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{PARTNERNAME}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="6"
						y="34"
						width="107"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Shell-by-date]]></text>
				</staticText>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="328"
						y="34"
						width="107"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Article unit]]></text>
				</staticText>
				<staticText>
					<reportElement
						style="Detail_Header"
						x="435"
						y="34"
						width="98"
						height="16"
						key="element-90"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="1Point" leftBorderColor="#FFFFFF" leftPadding="5" rightBorder="1Point" rightBorderColor="#FFFFFF" rightPadding="2" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<text><![CDATA[Other units]]></text>
				</staticText>
				<line direction="TopDown">
					<reportElement
						x="1"
						y="23"
						width="0"
						height="27"
						forecolor="#555555"
						backcolor="#555555"
						key="line-2"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="535"
						y="23"
						width="0"
						height="27"
						forecolor="#555555"
						backcolor="#555555"
						key="line-3"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="20"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="50"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Report_Title"
						mode="Transparent"
						x="0"
						y="0"
						width="535"
						height="26"
						key="textField-2"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="5" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement>
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{REPORT_TITLE}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="32"
						width="535"
						height="0"
						key="line-1"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="16"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="true" pattern="dd-MM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="6"
						y="0"
						width="107"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="Thin" leftBorderColor="#000000" leftPadding="2" rightBorder="Thin" rightBorderColor="#000000" rightPadding="2" bottomBorder="Thin" bottomBorderColor="#000000"/>
					<textElement verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$F{GUARANTEEDATE}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="113"
						y="0"
						width="215"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="Thin" rightBorderColor="#000000" rightPadding="2" bottomBorder="Thin" bottomBorderColor="#000000"/>
					<textElement verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{NAME}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="328"
						y="0"
						width="107"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="Thin" rightBorderColor="#000000" rightPadding="2" bottomBorder="Thin" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{MOVEMENTQTY}!=null)?$P{NUMBERFORMAT}.format($F{MOVEMENTQTY})+" "+$F{UOM}:new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						style="Detail_Line"
						x="435"
						y="0"
						width="98"
						height="16"
						key="textField"
						stretchType="RelativeToBandHeight"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="Thin" rightBorderColor="#000000" rightPadding="2" bottomBorder="Thin" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Bitstream Vera Sans"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{WEIGHT}!=null)?$P{NUMBERFORMAT}.format($F{WEIGHT})+" "+$V{UOM2}:new String(" ")]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="535"
						y="0"
						width="0"
						height="16"
						forecolor="#555555"
						backcolor="#555555"
						key="line-4"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="1"
						y="0"
						width="0"
						height="16"
						forecolor="#555555"
						backcolor="#555555"
						key="line-5"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="35"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="400"
						y="13"
						width="95"
						height="19"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Helvetica" size="10"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="499"
						y="13"
						width="36"
						height="19"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single">
						<font fontName="Helvetica" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="1"
						y="8"
						width="534"
						height="0"
						forecolor="#555555"
						backcolor="#555555"
						key="line"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="1"
						y="0"
						width="0"
						height="8"
						forecolor="#555555"
						backcolor="#555555"
						key="line-6"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="535"
						y="0"
						width="0"
						height="8"
						forecolor="#555555"
						key="line-7"/>
					<graphicElement stretchType="NoStretch" pen="2Point"/>
				</line>
			</band>
		</pageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>