src/org/openbravo/erpCommon/ad_reports/productionSubReport.jrxml
author David Baz Fayos <david.baz@openbravo.com>
Tue, 27 May 2008 15:26:10 +0000
changeset 1044 8691bbc94032
parent 726 dac2a1486bd3
child 2669 dfa1375ef2cf
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="productionSubReport"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="421"
		 pageHeight="595"
		 columnWidth="421"
		 columnSpacing="0"
		 leftMargin="0"
		 rightMargin="0"
		 topMargin="0"
		 bottomMargin="0"
		 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.*" />

	<parameter name="DATE_FROM" isForPrompting="true" class="java.util.Date">
		<defaultValueExpression ><![CDATA[new SimpleDateFormat("dd-MM-yyyy").parse("01-01-2000")]]></defaultValueExpression>
	</parameter>
	<parameter name="DATE_TO" isForPrompting="true" class="java.util.Date">
		<defaultValueExpression ><![CDATA[new SimpleDateFormat("dd-MM-yyyy").parse("01-01-3000")]]></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["(1000000)"]]></defaultValueExpression>
	</parameter>
	<parameter name="LANGUAGE" isForPrompting="false" class="java.lang.String">
		<defaultValueExpression ><![CDATA["en_US"]]></defaultValueExpression>
	</parameter>
	<parameter name="NUMBERFORMAT" isForPrompting="false" class="java.text.DecimalFormat"/>
	<parameter name="LOCALE" isForPrompting="false" class="java.util.Locale"/>
	<queryString><![CDATA[SELECT M_PRODUCT.NAME AS PRODUCT_NAME, SUM(ROUND(M_PRODUCTIONLINE.MOVEMENTQTY,2)) AS MOVEMENTQTY, C_UOM.NAME AS UOM_NAME
      FROM M_PRODUCTION, M_PRODUCTIONPLAN, M_PRODUCTIONLINE, M_PRODUCT, C_UOM
      WHERE M_PRODUCTION.M_PRODUCTION_ID = M_PRODUCTIONPLAN.M_PRODUCTION_ID
      AND M_PRODUCTIONPLAN.M_PRODUCTIONPLAN_ID = M_PRODUCTIONLINE.M_PRODUCTIONPLAN_ID
      AND M_PRODUCTIONLINE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
      AND M_PRODUCTIONLINE.C_UOM_ID = C_UOM.C_UOM_ID
      AND M_PRODUCTION.AD_CLIENT_ID IN ($P!{USER_CLIENT})
      AND M_PRODUCTION.AD_ORG_ID IN ($P!{USER_ORG})
      AND M_PRODUCTION.PROCESSED = 'Y'
      AND M_PRODUCTIONLINE.MOVEMENTQTY > 0
      AND M_PRODUCTION.MOVEMENTDATE >= $P{DATE_FROM}
      AND M_PRODUCTION.MOVEMENTDATE < $P{DATE_TO}
      AND M_PRODUCTION.ISSOTRX = 'Y'
      GROUP BY M_PRODUCT.NAME, C_UOM.NAME
      HAVING SUM(ROUND(M_PRODUCTIONLINE.MOVEMENTQTY,2)) > 0]]></queryString>

	<field name="PRODUCT_NAME" class="java.lang.String"/>
	<field name="MOVEMENTQTY" class="java.math.BigDecimal"/>
	<field name="UOM_NAME" class="java.lang.String"/>

		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</pageHeader>
		<columnHeader>
			<band height="20"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="0"
						y="3"
						width="170"
						height="17"
						forecolor="#000000"
						key="staticText"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left">
						<font fontName="Bitstream Vera Sans" pdfFontName="Helvetica-Bold" size="10" isBold="true" isUnderline="true"/>
					</textElement>
				<text><![CDATA[PRODUCTION REPORT]]></text>
				</staticText>
			</band>
		</columnHeader>
		<detail>
			<band height="18"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="1"
						width="170"
						height="16"
						forecolor="#000000"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="2" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left">
						<font fontName="Bitstream Vera Sans" size="10" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{PRODUCT_NAME}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="172"
						y="1"
						width="132"
						height="16"
						forecolor="#000000"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Right">
						<font fontName="Bitstream Vera Sans" size="10" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{MOVEMENTQTY}!=null)?$P{NUMBERFORMAT}.format($F{MOVEMENTQTY}):new String(" ")]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="304"
						y="1"
						width="69"
						height="16"
						forecolor="#000000"
						key="textField"/>
					<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" leftPadding="4" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
					<textElement textAlignment="Left">
						<font fontName="Bitstream Vera Sans" size="10" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{UOM_NAME}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</pageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>