<?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="sampleReport1" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.3310000000000004"/>
	<property name="ireport.x" value="18"/>
	<property name="ireport.y" value="0"/>
	<parameter name="RECORD_ID" class="java.lang.Integer" isForPrompting="false">
		<parameterDescription><![CDATA[]]></parameterDescription>
		<defaultValueExpression><![CDATA[1]]></defaultValueExpression>
	</parameter>
	<parameter name="customer_name" class="java.lang.String"/>
	<parameter name="order_date" class="java.util.Date"/>
	<queryString>
		<![CDATA[SELECT product_id, product_name, amount, price FROM order_detail]]>
	</queryString>
	<field name="product_id" class="java.lang.String"/>
	<field name="product_name" class="java.lang.String"/>
	<field name="amount" class="java.lang.Integer"/>
	<field name="price" class="java.lang.Integer"/>
	<variable name="SUBTOTAL" class="java.lang.Integer">
		<variableExpression><![CDATA[$F{amount}*$F{price}]]></variableExpression>
	</variable>
	<variable name="TOTAL" class="java.lang.Integer" calculation="Sum">
		<variableExpression><![CDATA[$V{SUBTOTAL}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="151" splitType="Stretch">
			<staticText>
				<reportElement x="248" y="39" width="88" height="28"/>
				<textElement>
					<font fontName="SansSerif" size="16" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H" isPdfEmbedded="false"/>
				</textElement>
				<text><![CDATA[発注書]]></text>
			</staticText>
			<textField>
				<reportElement x="0" y="87" width="230" height="20"/>
				<box topPadding="0" leftPadding="0" bottomPadding="0" rightPadding="0">
					<topPen lineWidth="0.0" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
				</box>
				<textElement>
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H" isPdfEmbedded="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{customer_name}]]></textFieldExpression>
			</textField>
			<textField pattern="yyyy年MM月dd日">
				<reportElement x="403" y="67" width="152" height="20"/>
				<textElement>
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$P{order_date}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="488" y="107" width="67" height="20"/>
				<textElement>
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"/>
				</textElement>
				<text><![CDATA[○○株式会社]]></text>
			</staticText>
			<staticText>
				<reportElement x="0" y="127" width="230" height="20"/>
				<textElement>
					<font fontName="SansSerif" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H" isPdfEmbedded="true"/>
				</textElement>
				<text><![CDATA[下記の通り発注いたします。]]></text>
			</staticText>
		</band>
	</title>
	<pageHeader>
		<band height="10" splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="37" splitType="Stretch">
			<staticText>
				<reportElement mode="Opaque" x="134" y="17" width="139" height="20" backcolor="#CCCCCC"/>
				<box leftPadding="2">
					<topPen lineWidth="0.5"/>
					<leftPen lineWidth="0.5"/>
					<bottomPen lineWidth="0.5"/>
					<rightPen lineWidth="0.5"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"/>
				</textElement>
				<text><![CDATA[商品名]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="273" y="17" width="100" height="20" backcolor="#CCCCCC"/>
				<box leftPadding="2">
					<topPen lineWidth="0.5"/>
					<leftPen lineWidth="0.5"/>
					<bottomPen lineWidth="0.5"/>
					<rightPen lineWidth="0.5"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"/>
				</textElement>
				<text><![CDATA[単価]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="373" y="17" width="30" height="20" backcolor="#CCCCCC"/>
				<box leftPadding="2">
					<topPen lineWidth="0.5"/>
					<leftPen lineWidth="0.5"/>
					<bottomPen lineWidth="0.5"/>
					<rightPen lineWidth="0.5"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"/>
				</textElement>
				<text><![CDATA[数量]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="403" y="17" width="152" height="20" backcolor="#CCCCCC"/>
				<box leftPadding="2">
					<topPen lineWidth="0.5"/>
					<leftPen lineWidth="0.5"/>
					<bottomPen lineWidth="0.5"/>
					<rightPen lineWidth="0.5"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"/>
				</textElement>
				<text><![CDATA[小計]]></text>
			</staticText>
			<staticText>
				<reportElement mode="Opaque" x="0" y="17" width="134" height="20" backcolor="#CCCCCC"/>
				<box leftPadding="2">
					<topPen lineWidth="0.5"/>
					<leftPen lineWidth="0.5"/>
					<bottomPen lineWidth="0.5"/>
					<rightPen lineWidth="0.5"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"/>
				</textElement>
				<text><![CDATA[商品コード]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="20" splitType="Stretch">
			<textField pattern="">
				<reportElement x="134" y="0" width="139" height="20"/>
				<box leftPadding="2">
					<topPen lineWidth="0.5"/>
					<leftPen lineWidth="0.5"/>
					<bottomPen lineWidth="0.5"/>
					<rightPen lineWidth="0.5"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{product_name}]]></textFieldExpression>
			</textField>
			<textField pattern="">
				<reportElement x="403" y="0" width="152" height="20"/>
				<box rightPadding="2">
					<topPen lineWidth="0.5"/>
					<leftPen lineWidth="0.5"/>
					<bottomPen lineWidth="0.5"/>
					<rightPen lineWidth="0.5"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font fontName="ＭＳ Ｐゴシック" pdfFontName="C:\WINDOWS\Fonts\MSGOTHIC.TTC,1" pdfEncoding="Identity-H"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[new DecimalFormat("###,###").format($V{SUBTOTAL})]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="273" y="0" width="100" height="20"/>
				<box rightPadding="2">
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.5" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.5" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font fontName="ＭＳ Ｐゴシック" pdfFontName="C:\WINDOWS\Fonts\MSGOTHIC.TTC,1" pdfEncoding="Identity-H"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[new DecimalFormat("###,###").format($F{price})]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="373" y="0" width="30" height="20"/>
				<box>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.5" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.5" lineStyle="Solid"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle"/>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$F{amount}]]></textFieldExpression>
			</textField>
			<textField pattern="">
				<reportElement x="0" y="0" width="134" height="20"/>
				<box leftPadding="2">
					<topPen lineWidth="0.5"/>
					<leftPen lineWidth="0.5"/>
					<bottomPen lineWidth="0.5"/>
					<rightPen lineWidth="0.5"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{product_id}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<summary>
		<band height="50">
			<staticText>
				<reportElement mode="Opaque" x="273" y="20" width="130" height="30" backcolor="#CCCCCC"/>
				<box leftPadding="2">
					<topPen lineWidth="0.5"/>
					<leftPen lineWidth="0.5"/>
					<bottomPen lineWidth="0.5"/>
					<rightPen lineWidth="0.5"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H"/>
				</textElement>
				<text><![CDATA[合計]]></text>
			</staticText>
			<textField>
				<reportElement x="403" y="20" width="152" height="30"/>
				<box rightPadding="2">
					<topPen lineWidth="0.5"/>
					<leftPen lineWidth="0.5"/>
					<bottomPen lineWidth="0.5"/>
					<rightPen lineWidth="0.5"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font fontName="ＭＳ Ｐゴシック" pdfFontName="C:\WINDOWS\Fonts\MSGOTHIC.TTC,1" pdfEncoding="Identity-H"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["\\" + new DecimalFormat("###,###").format($V{TOTAL})]]></textFieldExpression>
			</textField>
		</band>
	</summary>
</jasperReport>
