Преглед изворни кода

created the report management Jasper report1 as sample

master
[email protected] пре 3 недеља
родитељ
комит
4d37c12841
5 измењених фајлова са 1062 додато и 0 уклоњено
  1. +60
    -0
      src/main/java/com/ffii/fpsms/modules/report/service/ReportService.kt
  2. +47
    -0
      src/main/java/com/ffii/fpsms/modules/report/web/ReportController.kt
  3. +292
    -0
      src/main/resources/jasper/report1.jrxml
  4. +484
    -0
      src/main/resources/jasper/report2.jrxml
  5. +179
    -0
      src/main/resources/jasper/report2Sub1.jrxml

+ 60
- 0
src/main/java/com/ffii/fpsms/modules/report/service/ReportService.kt Прегледај датотеку

@@ -0,0 +1,60 @@
package com.ffii.fpsms.modules.report.service

import org.springframework.stereotype.Service
import net.sf.jasperreports.engine.*
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource
import java.io.InputStream
import com.ffii.core.support.JdbcDao

@Service
open class ReportService(
private val jdbcDao: JdbcDao,
) {
/**
* Queries the database for inventory data based on dates and optional item type.
*/
fun searchReport1(fromDate: String, toDate: String, itemType: String?): List<Map<String, Any>> {
val args = mutableMapOf<String, Any>(
"fromDate" to fromDate,
"toDate" to toDate
)
val itemTypeSql = if (!itemType.isNullOrBlank()) {
args["itemType"] = "%$itemType%"
"AND it.type LIKE :itemType"
} else ""

val sql = """
SELECT
-- fake value for demo
8.8 * iv.onHandQty as stockValue,
iv.onHandQty,
it.code as itemCode,
it.name as itemName,
uc.code as uom,
it.type, iv.status
FROM inventory iv
LEFT JOIN items it ON iv.itemId = it.id
LEFT JOIN uom_conversion uc ON iv.uomId = uc.id
WHERE iv.created >= :fromDate AND iv.created < :toDate
$itemTypeSql
""".trimIndent()
return jdbcDao.queryForList(sql, args)
}

/**
* Compiles and fills a Jasper Report, returning the PDF as a ByteArray.
*/
fun createPdfResponse(templatePath: String, params: Map<String, Any>, dataList: List<Map<String, Any>>): ByteArray {
val stream = this::class.java.getResourceAsStream(templatePath)
?: throw RuntimeException("Report template not found: $templatePath")
val jasperReport = JasperCompileManager.compileReport(stream)
val dataSource = JRBeanCollectionDataSource(dataList)
val jasperPrint = JasperFillManager.fillReport(jasperReport, params, dataSource)
return JasperExportManager.exportReportToPdf(jasperPrint)
}
}

+ 47
- 0
src/main/java/com/ffii/fpsms/modules/report/web/ReportController.kt Прегледај датотеку

@@ -0,0 +1,47 @@
package com.ffii.fpsms.modules.report.web

import net.sf.jasperreports.engine.*
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource
import org.springframework.http.*
import org.springframework.web.bind.annotation.*
import java.io.InputStream
import com.ffii.fpsms.modules.report.service.ReportService

@RestController
@RequestMapping("/report")
class ReportController(
private val reportService: ReportService,
) {

@GetMapping("/print-report1")
fun generateReport1(
@RequestParam fromDate: String,
@RequestParam toDate: String,
//this is an exampe of optional param
@RequestParam(required = false) itemType: String?
): ResponseEntity<ByteArray> {
val parameters = mutableMapOf<String, Any>()
parameters["fromDate"] = fromDate
parameters["toDate"] = toDate
// you may put more params to show
parameters["param1"] = "param1Value"
parameters["param2"] = "param2Value"

// Query the DB to get a list of data
val dbData = reportService.searchReport1(fromDate, toDate, itemType)

val pdfBytes = reportService.createPdfResponse(
"/jasper/report1.jrxml",
parameters,
dbData
)

val headers = HttpHeaders().apply {
contentType = MediaType.APPLICATION_PDF
setContentDispositionFormData("attachment", "Report1.pdf")
set("filename", "Report1.pdf")
}

return ResponseEntity(pdfBytes, headers, HttpStatus.OK)
}
}

+ 292
- 0
src/main/resources/jasper/report1.jrxml Прегледај датотеку

@@ -0,0 +1,292 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.21.3.final using JasperReports Library version 5.5.2 -->
<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="report1" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="521" leftMargin="38" rightMargin="36" topMargin="26" bottomMargin="20" uuid="49312eb3-1186-45a7-868b-2537c7d2e4cc">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
<property name="com.jasperassistant.designer.Grid" value="true"/>
<property name="com.jasperassistant.designer.SnapToGrid" value="true"/>
<property name="com.jasperassistant.designer.GridWidth" value="12"/>
<property name="com.jasperassistant.designer.GridHeight" value="12"/>
<property name="com.jasperassistant.designer.Margins" value="true"/>
<property name="com.jasperassistant.designer.Rulers" value="true"/>
<property name="com.jasperassistant.designer.SnapToGuides" value="true"/>
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="74"/>
<property name="ireport.y" value="48"/>
<property name="com.jaspersoft.studio.report.description" value=""/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/>
<import value="net.sf.jasperreports.engine.data.*"/>
<parameter name="param1" class="java.lang.String"/>
<parameter name="param2" class="java.lang.String"/>
<field name="itemCode" class="java.lang.String"/>
<field name="onHandQty" class="java.math.BigDecimal"/>
<field name="uom" class="java.lang.String"/>
<field name="stockValue" class="java.math.BigDecimal"/>
<variable name="sumStockValue" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{stockValue}]]></variableExpression>
</variable>
<group name="room"/>
<group name="client"/>
<group name="extra"/>
<group name="terms" isReprintHeaderOnEachPage="true"/>
<pageHeader>
<band height="90">
<textField>
<reportElement positionType="Float" x="0" y="32" width="520" height="24" uuid="689d005a-685c-413b-b4e3-f90c0becbb8a">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Center" verticalAlignment="Top">
<font fontName="SansSerif" size="18" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA["Stock Value Report"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="78" y="60" width="112" height="18" uuid="f3ac5e61-920f-46ed-9e2a-d486d5600baa">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="false" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA[$P{param1}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="60" width="78" height="18" uuid="d38e74d0-5f87-48c9-a1ae-c327ed4ce99b">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["Param1:"]]></textFieldExpression>
</textField>
<textField>
<reportElement positionType="Float" x="0" y="0" width="520" height="30" uuid="a4925e1f-4e68-485b-939b-cd770b6377fc">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Center" verticalAlignment="Top">
<font fontName="SansSerif" size="15" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA["Sample Report1 "]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="308" y="60" width="112" height="18" uuid="ec1f2c31-f45a-4325-ac1f-f25e36652b27">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="false" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA[$P{param2}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="230" y="60" width="78" height="18" uuid="c57176c7-1a9c-4a9d-9b5f-fe2d3c3f613b">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["Param2:"]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<columnHeader>
<band height="20">
<textField>
<reportElement x="390" y="0" width="130" height="20" uuid="fa334359-9b24-47f3-8e24-5a1e3b0b24aa"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Value (HKD)"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="291" y="0" width="99" height="20" uuid="b50b45c0-94f2-4cbd-8afd-1837a9bc2fba"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["UoM"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="82" height="20" uuid="de8ed324-0b93-4190-8851-8accc534d151"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Seq No."]]></textFieldExpression>
</textField>
<textField>
<reportElement x="82" y="0" width="109" height="20" uuid="85e6f2a9-438c-41f0-afff-df5e246a0324"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Item Code"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="191" y="0" width="100" height="20" uuid="bed11488-31fe-4428-8036-3780d8f85910"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["On Hand Qty"]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
<band height="20">
<textField>
<reportElement x="0" y="0" width="82" height="20" uuid="8fe0edcc-79c9-4d76-8727-569bfb4cf5a7">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="291" y="0" width="99" height="20" uuid="f1277ce2-13a4-4167-95c1-372eef4a21b3"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{uom}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="82" y="0" width="109" height="20" uuid="131b928b-b175-440c-a1c0-122deba803f4"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{itemCode}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement x="191" y="0" width="100" height="20" uuid="6bf325b1-7ce9-437c-bd34-61b72308217c"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{onHandQty}]]></textFieldExpression>
</textField>
<textField pattern="#,##0">
<reportElement x="390" y="0" width="130" height="20" uuid="cc129462-7e19-43f1-9261-1c0f784ecc18">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{stockValue}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="28">
<textField pattern="#,##0">
<reportElement x="390" y="0" width="130" height="20" uuid="2221231a-cd7a-41af-8386-2181e8e289fa">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<box>
<pen lineWidth="1.0"/>
<bottomPen lineWidth="3.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{stockValue}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="291" y="0" width="99" height="20" uuid="6a9bbbd9-49f3-404c-8804-989beef8d20f"/>
<box>
<pen lineWidth="1.0"/>
<bottomPen lineWidth="3.0" lineStyle="Double"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Total Value:"]]></textFieldExpression>
</textField>
</band>
</columnFooter>
</jasperReport>

+ 484
- 0
src/main/resources/jasper/report2.jrxml Прегледај датотеку

@@ -0,0 +1,484 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.21.3.final using JasperReports Library version 5.5.2 -->
<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="statment1" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="521" leftMargin="38" rightMargin="36" topMargin="26" bottomMargin="20" uuid="49312eb3-1186-45a7-868b-2537c7d2e4cc">
<property name="ireport.scriptlethandling" value="0"/>
<property name="ireport.encoding" value="UTF-8"/>
<property name="com.jasperassistant.designer.Grid" value="true"/>
<property name="com.jasperassistant.designer.SnapToGrid" value="true"/>
<property name="com.jasperassistant.designer.GridWidth" value="12"/>
<property name="com.jasperassistant.designer.GridHeight" value="12"/>
<property name="com.jasperassistant.designer.Margins" value="true"/>
<property name="com.jasperassistant.designer.Rulers" value="true"/>
<property name="com.jasperassistant.designer.SnapToGuides" value="true"/>
<property name="ireport.zoom" value="1.5"/>
<property name="ireport.x" value="74"/>
<property name="ireport.y" value="48"/>
<property name="com.jaspersoft.studio.report.description" value=""/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/>
<import value="net.sf.jasperreports.engine.data.*"/>
<parameter name="d" class="java.util.Map" isForPrompting="false"/>
<parameter name="ou" class="java.lang.String"/>
<parameter name="sub1Data" class="java.util.List"/>
<parameter name="testItems" class="org.hibernate.collection.PersistentList"/>
<parameter name="totalMi" class="java.lang.Integer"/>
<parameter name="totalMa" class="java.lang.Integer"/>
<parameter name="totalCr" class="java.lang.Integer"/>
<parameter name="sub1" class="net.sf.jasperreports.engine.JasperReport"/>
<parameter name="pics" class="java.util.List"/>
<parameter name="pQtyTotal" class="java.lang.Integer"/>
<parameter name="pMarkMax" class="java.lang.Integer"/>
<parameter name="netWeightTotal" class="java.math.BigDecimal"/>
<parameter name="grossWeightTotal" class="java.math.BigDecimal"/>
<parameter name="sub2" class="net.sf.jasperreports.engine.JasperReport"/>
<parameter name="sub2Data" class="java.util.List"/>
<parameter name="sumFee" class="java.lang.Integer"/>
<parameter name="totalNetIncome" class="java.lang.Integer"/>
<parameter name="sumAmount" class="java.lang.Integer"/>
<parameter name="sub3" class="net.sf.jasperreports.engine.JasperReport"/>
<parameter name="sub3Data" class="java.util.List"/>
<parameter name="abc" class="java.lang.Integer"/>
<parameter name="monthYear" class="java.lang.String"/>
<field name="memberName" class="java.lang.String"/>
<field name="memberNo" class="java.lang.String"/>
<field name="strIssueDate" class="java.lang.String"/>
<field name="boxQty" class="java.lang.String"/>
<field name="poItemSpec" class="java.lang.String"/>
<field name="totalTravel" class="java.lang.String"/>
<field name="qty" class="java.math.BigDecimal"/>
<field name="waitingHrs" class="java.lang.String"/>
<field name="refCode" class="java.lang.String"/>
<field name="unit_price" class="java.lang.Double"/>
<field name="totalNetWeight" class="java.math.BigDecimal"/>
<field name="totalGrossWeight" class="java.math.BigDecimal"/>
<field name="pMarkNum" class="java.lang.String"/>
<field name="pMarkQty" class="java.lang.String"/>
<field name="pMark" class="java.lang.String"/>
<field name="pType" class="java.lang.String"/>
<field name="netWeight" class="java.math.BigDecimal"/>
<field name="grossWeight" class="java.math.BigDecimal"/>
<field name="poiRemarks" class="java.lang.String"/>
<field name="country" class="java.lang.String"/>
<field name="uomItem" class="java.lang.String"/>
<field name="strDueDate" class="java.lang.String"/>
<variable name="sumPQty" class="java.lang.String" calculation="Sum"/>
<variable name="sumTotalNetWeight" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{totalNetWeight}]]></variableExpression>
</variable>
<variable name="sumTotalGrossWeight" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[$F{totalGrossWeight}]]></variableExpression>
</variable>
<group name="room">
<groupHeader>
<band height="68">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="0" width="270" height="16" uuid="c47ac354-5745-4c86-a980-cdccc02e63f3">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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 verticalAlignment="Top">
<font fontName="SansSerif" size="12" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["1) Room Rental Fee"]]></textFieldExpression>
</textField>
<subreport>
<reportElement key="sub1" x="0" y="20" width="520" height="40" uuid="c4ae69f1-6ca5-454a-8f53-04b899c186e7">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($P{sub1Data})]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{sub1}]]></subreportExpression>
</subreport>
</band>
</groupHeader>
</group>
<group name="client">
<groupHeader>
<band height="67">
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="0" width="518" height="16" uuid="bea3cf50-ca99-4a75-857b-56d17d8bc366">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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 verticalAlignment="Top">
<font fontName="SansSerif" size="12" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["2) Income from Counselling Cases/ Supervisions/ Others"]]></textFieldExpression>
</textField>
<subreport>
<reportElement key="sub2" x="0" y="20" width="520" height="40" uuid="bbde4ac5-4d6b-4c5a-8f73-adc847a45f31">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($P{sub2Data})]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{sub2}]]></subreportExpression>
</subreport>
</band>
</groupHeader>
</group>
<group name="extra">
<groupHeader>
<band height="63">
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="0" width="270" height="16" uuid="583c4337-e476-4e4d-b0ef-463276171908">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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 verticalAlignment="Top">
<font fontName="SansSerif" size="12" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["3) Extra Item"]]></textFieldExpression>
</textField>
<subreport>
<reportElement key="sub3" x="0" y="20" width="520" height="40" uuid="acdc1632-40d1-4c35-8f27-5fad10e23e54">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.y" value="px"/>
</reportElement>
<dataSourceExpression><![CDATA[new JRBeanCollectionDataSource($P{sub3Data})]]></dataSourceExpression>
<subreportExpression><![CDATA[$P{sub3}]]></subreportExpression>
</subreport>
</band>
</groupHeader>
</group>
<group name="terms" isReprintHeaderOnEachPage="true">
<groupHeader>
<band height="178">
<textField pattern="#,##0;(#,##0)" isBlankWhenNull="true">
<reportElement x="390" y="0" width="130" height="20" uuid="dd8893af-35ef-439f-8f27-fea29845bafe"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$P{abc}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="390" height="20" uuid="60ddfb71-c81c-4aae-9ae9-9e1cd170f248">
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
</reportElement>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
<paragraph rightIndent="3"/>
</textElement>
<textFieldExpression><![CDATA["Total Balance (a - b + c) : "]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="64" width="520" height="16" uuid="f7a3ef57-1fc5-489e-b948-bc6f037a0a6d">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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 verticalAlignment="Top">
<font fontName="SansSerif" size="12" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["Payment Instruction:"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="312" y="20" width="78" height="18" uuid="568a335f-b4a5-48a0-83d2-8cf793bb3d7f">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["Due Date:"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="390" y="20" width="130" height="18" uuid="bc645428-bcd6-4073-9574-8015725f3281">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="false" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA[$F{strDueDate}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="-1" y="120" width="520" height="16" uuid="19a08cea-98d8-47d8-a735-cec827a93538">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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 verticalAlignment="Top">
<font fontName="SansSerif" size="12" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["Payment methods:"]]></textFieldExpression>
</textField>
</band>
</groupHeader>
</group>
<pageHeader>
<band height="162">
<textField>
<reportElement positionType="Float" x="0" y="32" width="520" height="24" uuid="689d005a-685c-413b-b4e3-f90c0becbb8a">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Center" verticalAlignment="Top">
<font fontName="SansSerif" size="18" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA["Monthly Payment Summary"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="126" width="100" height="16" uuid="04c1c294-8327-477e-a03c-b7d43f15cdfc">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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 verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["Name of Member:"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="410" y="106" width="112" height="18" uuid="f3ac5e61-920f-46ed-9e2a-d486d5600baa">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="false" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA[$F{strIssueDate}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="332" y="106" width="78" height="18" uuid="d38e74d0-5f87-48c9-a1ae-c327ed4ce99b">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["Date of Issue:"]]></textFieldExpression>
</textField>
<textField>
<reportElement positionType="Float" x="0" y="0" width="520" height="30" uuid="a4925e1f-4e68-485b-939b-cd770b6377fc">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Center" verticalAlignment="Top">
<font fontName="SansSerif" size="15" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA["Sample Report2"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="142" width="100" height="16" uuid="853990ad-ff69-4c0c-8b58-468f812103da">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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 verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["Member No:"]]></textFieldExpression>
</textField>
<textField pattern="d/MM/yyyy" isBlankWhenNull="true">
<reportElement positionType="Float" x="410" y="90" width="112" height="17" uuid="6ec5d8c5-6c46-4f5f-babd-699d9b6236a8">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="false" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA[$F{refCode}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="332" y="90" width="78" height="16" uuid="d74aeb89-d86d-4be9-a1a8-f57b0e768412">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<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="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA["Number:"]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="55" width="520" height="24" uuid="915d2716-893b-45c9-a2c9-9090b2c71a95">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Center" verticalAlignment="Top">
<font fontName="SansSerif" size="18" isBold="true" isUnderline="false"/>
<paragraph lineSpacing="Single"/>
</textElement>
<textFieldExpression><![CDATA[$P{monthYear}]]></textFieldExpression>
</textField>
<textField pattern="d/MM/yyyy" isBlankWhenNull="true">
<reportElement positionType="Float" x="100" y="126" width="165" height="17" uuid="779cc28e-78a3-4d0d-aab7-6be6685b7cce">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="false" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA[$F{memberName}]]></textFieldExpression>
</textField>
<textField pattern="d/MM/yyyy" isBlankWhenNull="true">
<reportElement positionType="Float" x="100" y="142" width="165" height="17" uuid="8741b886-38fe-4544-b933-65ec34b98a3e">
<property name="com.jaspersoft.studio.unit.leftIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<box>
<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 textAlignment="Left" verticalAlignment="Top">
<font fontName="SansSerif" size="10" isBold="false" isUnderline="false"/>
<paragraph lineSpacing="Single" leftIndent="1" rightIndent="1"/>
</textElement>
<textFieldExpression><![CDATA[$F{memberNo}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
</jasperReport>

+ 179
- 0
src/main/resources/jasper/report2Sub1.jrxml Прегледај датотеку

@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.21.3.final using JasperReports Library version 5.5.2 -->
<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="sub1" pageWidth="520" pageHeight="70" whenNoDataType="AllSectionsNoDetail" columnWidth="520" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="f229ee55-cde3-4e3c-a5be-4d270a060dc0">
<property name="net.sf.jasperreports.export.pdf.force.page.format" value="true"/>
<property name="net.sf.jasperreports.page.break.no.pagination" value="apply"/>
<property name="net.sf.jasperreports.print.create.bookmarks" value="false"/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
<import value="net.sf.jasperreports.engine.*"/>
<import value="java.util.*"/>
<import value="net.sf.jasperreports.engine.data.*"/>
<parameter name="d" class="java.util.Map" isForPrompting="false"/>
<parameter name="ou" class="java.lang.String"/>
<parameter name="problemItems" class="java.util.List"/>
<parameter name="testItems" class="java.util.List"/>
<parameter name="totalMi" class="java.lang.Integer"/>
<parameter name="totalMa" class="java.lang.Integer"/>
<parameter name="totalCr" class="java.lang.Integer"/>
<parameter name="picSubReport" class="net.sf.jasperreports.engine.JasperReport"/>
<parameter name="pics" class="java.util.List"/>
<parameter name="pQtyTotal" class="java.lang.Integer"/>
<parameter name="pMarkMax" class="java.lang.Integer"/>
<parameter name="netWeightTotal" class="java.math.BigDecimal"/>
<parameter name="grossWeightTotal" class="java.math.BigDecimal"/>
<field name="strBookingDate" class="java.lang.String"/>
<field name="itemCode" class="java.lang.String"/>
<field name="onHandQty" class="java.math.BigDecimal"/>
<field name="stockValue" class="java.lang.String"/>
<field name="seqNo" class="java.lang.Integer"/>
<variable name="sumValue" class="java.math.BigDecimal" calculation="Sum">
<variableExpression><![CDATA[org.apache.commons.lang3.math.NumberUtils.toInt($F{stockValue})]]></variableExpression>
</variable>
<columnHeader>
<band height="20">
<textField>
<reportElement x="0" y="0" width="82" height="20" uuid="42a351fc-465c-4c79-99e2-5b2052e9371e"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Seq No."]]></textFieldExpression>
</textField>
<textField>
<reportElement x="82" y="0" width="99" height="20" uuid="ca2e0477-5df7-4f31-b5f4-778d41fb271b"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Date"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="181" y="0" width="109" height="20" uuid="6c0eaf42-1ac0-49d8-980e-c91459188760"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Item Code"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="290" y="0" width="100" height="20" uuid="051839d1-166d-4d15-9518-691e5b2a2148"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["On Hand Qty"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="390" y="0" width="130" height="20" uuid="a475c7e7-6be8-429f-9c21-437d68674eb8"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Value (HKD)"]]></textFieldExpression>
</textField>
</band>
</columnHeader>
<detail>
<band height="20">
<textField>
<reportElement x="0" y="0" width="82" height="20" uuid="acc198d3-c54b-4879-9a34-e22dfa70b9d7">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{seqNo}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="82" y="0" width="99" height="20" uuid="bab4e8be-f48e-4b67-8463-ff60fddcb5fc"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{strBookingDate}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="181" y="0" width="109" height="20" uuid="a406432a-5e96-4ad1-aee6-897c039a204c"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{itemCode}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement x="290" y="0" width="100" height="20" uuid="4ab32b66-2743-4caa-be43-67daff5ed01a"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{onHandQty}]]></textFieldExpression>
</textField>
<textField pattern="#,##0">
<reportElement x="390" y="0" width="130" height="20" uuid="787a4a58-11a7-4ec2-a567-1b4cfc50f86b">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{stockValue}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="20">
<textField pattern="#,##0" isBlankWhenNull="true">
<reportElement x="390" y="0" width="130" height="20" uuid="bb766b1e-ad22-44f0-8bf1-8de174b9314c"/>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="SansSerif" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$V{sumValue}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="390" height="20" uuid="9ce34cfe-1afc-47d5-a28a-3b78b38e3d4e">
<property name="com.jaspersoft.studio.unit.rightIndent" value="px"/>
</reportElement>
<box>
<pen lineWidth="1.0"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="SansSerif" size="8" isBold="true"/>
<paragraph rightIndent="3"/>
</textElement>
<textFieldExpression><![CDATA["Total Value : "]]></textFieldExpression>
</textField>
</band>
</pageFooter>
</jasperReport>

Loading…
Откажи
Сачувај