<?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="null" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.5"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<parameter name="namars" class="java.lang.String"/>
	<parameter name="alamatrs" class="java.lang.String"/>
	<parameter name="kotars" class="java.lang.String"/>
	<parameter name="propinsirs" class="java.lang.String"/>
	<parameter name="kontakrs" class="java.lang.String"/>
	<parameter name="emailrs" class="java.lang.String"/>
	<parameter name="logo" class="java.io.InputStream"/>
	<queryString>
		<![CDATA[select detail_pemberian_obat.tgl_perawatan,detail_pemberian_obat.no_rawat,
detail_pemberian_obat.kode_brng,databarang.nama_brng, kodesatuan.satuan,detail_pemberian_obat.biaya_obat,detail_pemberian_obat.jml, 
(detail_pemberian_obat.biaya_obat*detail_pemberian_obat.jml) as subtotal,(detail_pemberian_obat.embalase+detail_pemberian_obat.tuslah) as tambahan,detail_pemberian_obat.total, 
databarang.h_beli,(databarang.h_beli * detail_pemberian_obat.jml) as total_asal, 
(detail_pemberian_obat.total-(databarang.h_beli * detail_pemberian_obat.jml)) as keuntungan 
from detail_pemberian_obat inner join databarang inner join kodesatuan 
on detail_pemberian_obat.kode_brng=databarang.kode_brng 
and databarang.kode_sat=kodesatuan.kode_sat 
 order by detail_pemberian_obat.tgl_perawatan,detail_pemberian_obat.no_rawat]]>
	</queryString>
	<field name="tgl_perawatan" class="java.sql.Date">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="no_rawat" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="kode_brng" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="nama_brng" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="satuan" class="java.lang.String">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="biaya_obat" class="java.lang.Double">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="jml" class="java.lang.Double">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="subtotal" class="java.lang.Double">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="tambahan" class="java.lang.Double">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="total" class="java.lang.Double">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="h_beli" class="java.lang.Double">
		<fieldDescription><![CDATA[]]></fieldDescription>
	</field>
	<field name="total_asal" class="java.lang.Double"/>
	<field name="keuntungan" class="java.lang.Double"/>
	<variable name="total" class="java.lang.Double" calculation="Sum">
		<variableExpression><![CDATA[$F{keuntungan}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="84" splitType="Stretch">
			<staticText>
				<reportElement x="189" y="53" width="424" height="23"/>
				<textElement textAlignment="Center" lineSpacing="Single">
					<font fontName="Tahoma" size="11" isBold="false"/>
				</textElement>
				<text><![CDATA[PROYEKSI KEUNTUNGAN PEMBERIAN OBAT]]></text>
			</staticText>
			<textField>
				<reportElement x="2" y="35" width="800" height="14"/>
				<textElement textAlignment="Center" lineSpacing="Single">
					<font fontName="Tahoma" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["E-mail : "+$P{emailrs}]]></textFieldExpression>
			</textField>
			<image scaleImage="FillFrame" onErrorType="Blank">
				<reportElement x="0" y="2" width="48" height="45"/>
				<imageExpression class="java.io.InputStream"><![CDATA[$P{logo}]]></imageExpression>
			</image>
			<textField>
				<reportElement x="2" y="14" width="800" height="14"/>
				<textElement textAlignment="Center" lineSpacing="Single">
					<font fontName="Tahoma" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{alamatrs}+", "+$P{kotars}+", "+$P{propinsirs}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="2" y="0" width="800" height="17"/>
				<textElement textAlignment="Center" lineSpacing="Single">
					<font fontName="Tahoma" size="12"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{namars}]]></textFieldExpression>
			</textField>
			<line>
				<reportElement x="0" y="48" width="802" height="1"/>
				<graphicElement>
					<pen lineWidth="2.0" lineStyle="Double"/>
				</graphicElement>
			</line>
			<textField>
				<reportElement x="2" y="25" width="800" height="14"/>
				<textElement textAlignment="Center" lineSpacing="Single">
					<font fontName="Tahoma" size="9"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$P{kontakrs}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="18" splitType="Stretch">
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="0" y="0" width="58" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[ Tgl.Beri]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="328" y="0" width="40" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[Satuan]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="459" y="0" width="55" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[Subtotal Biaya]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="58" y="0" width="52" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[No.Rawat]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="683" y="0" width="61" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[Total Beli]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="628" y="0" width="55" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[Harga Beli]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="567" y="0" width="61" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[Total Biaya]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="110" y="0" width="218" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[Barang]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="368" y="0" width="52" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[Biaya Obat]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="420" y="0" width="39" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[Jml.Obat]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="744" y="0" width="58" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[Keuntungan]]></text>
			</staticText>
			<staticText>
				<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="514" y="0" width="53" height="18" forecolor="#000000" backcolor="#F0F0DC"/>
				<textElement verticalAlignment="Middle" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<text><![CDATA[Emb+Tsl]]></text>
			</staticText>
			<line>
				<reportElement x="0" y="0" width="802" height="1"/>
				<graphicElement>
					<pen lineWidth="0.5"/>
				</graphicElement>
			</line>
			<line>
				<reportElement x="0" y="17" width="802" height="1"/>
				<graphicElement>
					<pen lineWidth="0.5"/>
				</graphicElement>
			</line>
		</band>
	</columnHeader>
	<detail>
		<band height="11" splitType="Stretch">
			<textField isStretchWithOverflow="true" pattern="dd/MM/yyyy" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="58" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{tgl_perawatan}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="58" y="0" width="52" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{no_rawat}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="110" y="0" width="63" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{kode_brng}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="328" y="0" width="40" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{satuan}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="368" y="0" width="52" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{biaya_obat}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="420" y="0" width="39" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{jml}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="459" y="0" width="55" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{subtotal}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="567" y="0" width="61" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{total}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="628" y="0" width="55" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{h_beli}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="683" y="0" width="61" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{total_asal}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="744" y="0" width="58" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{keuntungan}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="173" y="0" width="155" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{nama_brng}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="514" y="0" width="53" height="10"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$F{tambahan}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="18" splitType="Stretch">
			<textField evaluationTime="Report" pattern="" isBlankWhenNull="false">
				<reportElement key="textField" x="498" y="3" width="60" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement key="textField" x="328" y="3" width="170" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement textAlignment="Right" lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA["Halaman " + $V{PAGE_NUMBER} + " dari "]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy HH.mm.ss" isBlankWhenNull="false">
				<reportElement key="textField" x="1" y="3" width="74" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[new Date()]]></textFieldExpression>
			</textField>
			<textField pattern="" isBlankWhenNull="false">
				<reportElement key="textField" x="158" y="3" width="87" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
				<box>
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{REPORT_COUNT}.toString()]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Opaque" x="110" y="3" width="46" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement textAlignment="Right" lineSpacing="Single">
					<font fontName="Tahoma" size="8" isBold="false"/>
				</textElement>
				<text><![CDATA[Record :]]></text>
			</staticText>
			<line>
				<reportElement x="0" y="0" width="802" height="1"/>
				<graphicElement>
					<pen lineWidth="0.5"/>
				</graphicElement>
			</line>
			<line>
				<reportElement x="0" y="16" width="802" height="1"/>
				<graphicElement>
					<pen lineWidth="0.5"/>
				</graphicElement>
			</line>
			<textField isStretchWithOverflow="true" pattern="#,##0" isBlankWhenNull="true">
				<reportElement stretchType="RelativeToBandHeight" x="744" y="3" width="58" height="15"/>
				<textElement lineSpacing="Single">
					<font fontName="Tahoma" size="8"/>
				</textElement>
				<textFieldExpression class="java.lang.Double"><![CDATA[$V{total}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement mode="Transparent" x="683" y="3" width="61" height="15" forecolor="#000000" backcolor="#FFFFFF"/>
				<textElement textAlignment="Right" lineSpacing="Single">
					<font fontName="Tahoma" size="8" isBold="false"/>
				</textElement>
				<text><![CDATA[Total : ]]></text>
			</staticText>
		</band>
	</pageFooter>
</jasperReport>
