Skip to content

Instantly share code, notes, and snippets.

@fanjavaid
Created October 24, 2013 08:06
Show Gist options
  • Save fanjavaid/7133085 to your computer and use it in GitHub Desktop.
Save fanjavaid/7133085 to your computer and use it in GitHub Desktop.
Transaction Report
<?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="rpt_transaksi" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="e1435644-0f7c-4dd3-bdc8-0af94b9b7006">
<property name="ireport.zoom" value="1.272292855117455"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<queryString>
<![CDATA[SELECT expenses, amount, tgl_transaksi FROM tb_transaksi_beli;]]>
</queryString>
<field name="expenses" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="amount" class="java.lang.Double">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="tgl_transaksi" class="java.sql.Date">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="44" splitType="Stretch">
<staticText>
<reportElement uuid="a0ec4511-065d-4520-9921-bde257ad6117" x="168" y="13" width="219" height="20"/>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="14" isBold="true"/>
</textElement>
<text><![CDATA[Judul Laporan]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="26" splitType="Stretch">
<staticText>
<reportElement uuid="ce684b6e-4cc3-408c-bbc6-f8757a395c00" x="0" y="0" width="185" height="20" backcolor="#99CCFF"/>
<textElement verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Date]]></text>
</staticText>
<staticText>
<reportElement uuid="b71e8868-7f05-4d6f-b3d4-8ee89b50c6ac" x="185" y="0" width="185" height="20" backcolor="#99CCFF"/>
<textElement verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Expenses]]></text>
</staticText>
<staticText>
<reportElement uuid="faa9e1b3-fc1d-48e0-b225-a4f381a348ea" x="370" y="0" width="185" height="20" backcolor="#99CCFF"/>
<textElement verticalAlignment="Middle">
<font isBold="true"/>
</textElement>
<text><![CDATA[Amount]]></text>
</staticText>
<line>
<reportElement uuid="88079ad7-73b4-42fc-8ef1-0da1fabe3009" x="0" y="20" width="555" height="1"/>
</line>
<line>
<reportElement uuid="88079ad7-73b4-42fc-8ef1-0da1fabe3009" x="0" y="0" width="555" height="1"/>
</line>
</band>
</columnHeader>
<detail>
<band height="22" splitType="Stretch">
<textField>
<reportElement uuid="3b41fa61-4eae-40e6-b891-dd26c7512a81" x="0" y="0" width="185" height="20"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{tgl_transaksi} == null ? "-" : new SimpleDateFormat("dd MMMM yyyy ").format($F{tgl_transaksi})]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="db4686d9-1b10-4956-af20-d71673e7565c" x="370" y="0" width="185" height="20"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{amount}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="2b98dbc6-de42-41a7-bb10-0cb2448c64ba" x="185" y="0" width="185" height="20"/>
<textElement verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{expenses}]]></textFieldExpression>
</textField>
<line>
<reportElement uuid="88079ad7-73b4-42fc-8ef1-0da1fabe3009" x="0" y="20" width="555" height="1"/>
</line>
</band>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment