The textField with net.sf.jasperreports.export.pdf.field.read.only" value="false" in detail band not rendered in Acrobat Reader DC - jasper-reports

I have a report built with help of JasperReports 6.16.0 and contains some fields like:
<band height="15" splitType="Stretch">
<textField>
<reportElement x="350" y="0" width="60" height="15" uuid="474e8822-4d2c-43d2-b18b-a0a68ac8a055">
<property name="net.sf.jasperreports.export.pdf.field.read.only" value="false"/>
<property name="net.sf.jasperreports.export.pdf.field.type" value="Text"/>
</reportElement>
<box leftPadding="5" rightPadding="5">
<pen lineWidth="0.5"/>
<topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[($F{anzahl}!= null && $F{anzahl} > 0 ? $F{anzahl}: "-")]]></textFieldExpression>
</textField>
The problem is, that the pdf gets rendered fine in every pdf-reader I tried, but not in Acrobat Reader (DC).
The output result at Kofax application:
And this is how the same pdf file looks like at Acrobat Reader:
What happens is, that ONLY the first textfield gets rendered and the following textfields are blank.
A first guess was the uuid of the reportElement, so I removed it. But the result was the same.
The generated pdf without net.sf.jasperreports.export.pdf.field.* properties looks fine at Acrobat Reader.
Any ideas how to fix this issue?

Related

Use main report data for table in Jasper reports

Development IDE used : Jaspersoft Studio
I am trying to use main report datasource for table dataset by using the below expression but i am not getting any data.
Please advise on how to pass the datasource from report to table. I am new to jasper reports. Samples would be helpful.
JRXML:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.1.final using JasperReports Library version 6.2.1 -->
<!-- 2017-07-18T10:42:15 -->
<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="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="62118ef8-810f-4b01-a13c-46539c328b0e">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="LendingTrustFee1_3_Json"/>
<style name="Title" fontName="Arial Unicode MS" fontSize="14"/>
<style name="SubTitle" forecolor="#736343" fontName="Arial Unicode MS" fontSize="11"/>
<style name="Column header" forecolor="#666666" fontName="Arial Unicode MS" fontSize="11"/>
<style name="Detail" fontName="Arial Unicode MS" fontSize="11" pdfEncoding="Identity-H"/>
<style name="Table_TH" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 1_TH" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 2_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 3_TH" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 3_CH" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 3_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="TableDataset" uuid="b931bf1c-7487-4583-8af0-254967fef65f">
<queryString language="csv">
<![CDATA[]]>
</queryString>
<field name="ClientAndBenificiary" class="java.lang.String">
<fieldDescription><![CDATA[ClientAndBenificiary]]></fieldDescription>
</field>
<field name="DepartmentNameOfLender" class="java.lang.String">
<fieldDescription><![CDATA[DepartmentNameOfLender]]></fieldDescription>
</field>
<field name="TrustNoJapanese" class="java.lang.String">
<fieldDescription><![CDATA[TrustNoJapanese]]></fieldDescription>
</field>
<field name="ContractSignDate" class="java.sql.Date">
<fieldDescription><![CDATA[ContractSignDate]]></fieldDescription>
</field>
<field name="TrustNo" class="java.lang.String">
<fieldDescription><![CDATA[TrustNo]]></fieldDescription>
</field>
<field name="ReportStartDate" class="java.sql.Date">
<fieldDescription><![CDATA[ReportStartDate]]></fieldDescription>
</field>
<field name="EndStartDate" class="java.sql.Date">
<fieldDescription><![CDATA[EndStartDate]]></fieldDescription>
</field>
<field name="ReportPeriod" class="java.lang.String">
<fieldDescription><![CDATA[ReportPeriod]]></fieldDescription>
</field>
<field name="Currency" class="java.lang.String">
<fieldDescription><![CDATA[Currency]]></fieldDescription>
</field>
<field name="ShowLoanValue" class="java.lang.Boolean">
<fieldDescription><![CDATA[ShowLoanValue]]></fieldDescription>
</field>
<field name="ShowCleanPrice" class="java.lang.Boolean">
<fieldDescription><![CDATA[ShowCleanPrice]]></fieldDescription>
</field>
<field name="ShowAccruedInt" class="java.lang.Boolean">
<fieldDescription><![CDATA[ShowAccruedInt]]></fieldDescription>
</field>
<field name="ShowDirtyPrice" class="java.lang.Boolean">
<fieldDescription><![CDATA[ShowDirtyPrice]]></fieldDescription>
</field>
<field name="UDF1" class="java.lang.String">
<fieldDescription><![CDATA[UDF1]]></fieldDescription>
</field>
<field name="UDF2" class="java.lang.String">
<fieldDescription><![CDATA[UDF2]]></fieldDescription>
</field>
<field name="ReportFrequency" class="java.lang.String">
<fieldDescription><![CDATA[ReportFrequency]]></fieldDescription>
</field>
<field name="QtrReportStartDate" class="java.sql.Date">
<fieldDescription><![CDATA[QtrReportStartDate]]></fieldDescription>
</field>
<field name="QtrReportEndDate" class="java.sql.Date">
<fieldDescription><![CDATA[QtrReportEndDate]]></fieldDescription>
</field>
<field name="Securities_No_Mon1_3" class="java.lang.String">
<fieldDescription><![CDATA[Securities_No_Mon1_3]]></fieldDescription>
</field>
<field name="Lending_Fee_Mon1_3" class="java.math.BigDecimal">
<fieldDescription><![CDATA[Lending_Fee_Mon1_3]]></fieldDescription>
</field>
<field name="Trust_Fee_Mon1_3" class="java.math.BigDecimal">
<fieldDescription><![CDATA[Trust_Fee_Mon1_3]]></fieldDescription>
</field>
<field name="Consumption_Tax_Mon1_3" class="java.math.BigDecimal">
<fieldDescription><![CDATA[Consumption_Tax_Mon1_3]]></fieldDescription>
</field>
<field name="Trust_Fee_Tax_Included_Mon1_3" class="java.math.BigDecimal">
<fieldDescription><![CDATA[Trust_Fee_Tax_Included_Mon1_3]]></fieldDescription>
</field>
<field name="SectionType" class="java.lang.String">
<fieldDescription><![CDATA[SectionType]]></fieldDescription>
</field>
<filterExpression><![CDATA[LEN($F{Securities_No_Mon1_3}) > 0]]></filterExpression>
</subDataset>
<queryString>
<![CDATA[]]>
</queryString>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="322" splitType="Stretch">
<componentElement>
<reportElement x="-1" y="0" width="551" height="220" uuid="3aaf3c11-1464-432e-a55d-fef0a54cfdaa">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table 3_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table 3_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table 3_TD"/>
</reportElement>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="TableDataset" uuid="75b0fbb9-805b-4e97-86e2-9a2688aae1ff">
<dataSourceExpression><![CDATA[$P{REPORT_DATA_SOURCE}]]></dataSourceExpression>
</datasetRun>
<jr:column width="90" uuid="21ee4add-5a78-4c46-8ae3-1da6c6759a19">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:detailCell style="Table 3_TD" height="30">
<textField>
<reportElement style="Detail" positionType="Float" x="0" y="0" width="90" height="30" uuid="575908d3-6ea1-4a84-a95c-985941866a21"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{Securities_No_Mon1_3}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="90" uuid="b5f25971-4c63-4094-ab6a-102adb70593e">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:detailCell style="Table 3_TD" height="30">
<textField>
<reportElement style="Detail" positionType="Float" x="0" y="0" width="90" height="30" uuid="aa37293c-1ffc-48d3-a3f2-32abc83ebcb8"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{Lending_Fee_Mon1_3}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="80" uuid="96b8c9f2-b20f-4850-8702-aa4935cd496f">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column3"/>
<jr:detailCell style="Table 3_TD" height="30">
<textField>
<reportElement style="Detail" positionType="Float" x="0" y="0" width="80" height="30" uuid="0c059aad-8bf2-45c7-854f-c26bcdcbcb72"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{Trust_Fee_Mon1_3}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="70" uuid="4c69cb0c-bcd8-46a5-9ccc-f284fa037f14">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column4"/>
<jr:detailCell style="Table 3_TD" height="30">
<textField>
<reportElement style="Detail" positionType="Float" x="0" y="0" width="70" height="30" uuid="89d56faf-0773-4b1b-9229-08e2322e7650"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{Consumption_Tax_Mon1_3}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="170" uuid="1ff92af5-e2c2-4ab9-864a-73496dec702d">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column5"/>
<jr:detailCell style="Table 3_TD" height="30">
<textField>
<reportElement style="Detail" positionType="Float" x="0" y="0" width="170" height="30" uuid="1ecb2036-49d9-4337-b1de-2aa660e15bd6"/>
<box>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<textElement textAlignment="Right" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$F{Trust_Fee_Tax_Included_Mon1_3}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
</jasperReport>
Json Data:
[{"sectionType":"A","ClientAndBenificiary":"全国共済水産業協同組合連合会","DepartmentNameOfLender":"財務運用部 御中","TrustNoJapanese":"6018","ContractSignDate":"2013-04-23","TrustNo":"6018","ReportStartDate":"2016-07-01","EndStartDate":"2016-07-31","ReportPeriod":"2016-07-01から2016-07-31まで","Currency":"円","ShowLoanValue":"0","ShowCleanPrice":"0","ShowAccruedInt":"0","ShowDirtyPrice":"0","UDF1":"0.08","UDF2":"","ReportFrequency":"","QtrReportStartDate":"2016-07-01","QtrReportEndDate":"2016-08-01","Securities_No_Mon1_3":"JGB #289(10)Total","Lending_Fee_Mon1_3":"523645.000000000","Trust_Fee_Mon1_3":"174537.000000000","Consumption_Tax_Mon1_3":"13950.000000000","Trust_Fee_Tax_Included_Mon1_3":"188487.000000000","ReportLanguage":"ja","SectionType":"A"},{"sectionType":"A","ClientAndBenificiary":"全国共済水産業協同組合連合会","DepartmentNameOfLender":"財務運用部 御中","TrustNoJapanese":"6018","ContractSignDate":"2013-04-23","TrustNo":"6018","ReportStartDate":"2016-07-01","EndStartDate":"2016-07-31","ReportPeriod":"2016-07-01から2016-07-31まで","Currency":"円","ShowLoanValue":"0","ShowCleanPrice":"0","ShowAccruedInt":"0","ShowDirtyPrice":"0","UDF1":"0.08","UDF2":"","ReportFrequency":"","QtrReportStartDate":"2016-07-01","QtrReportEndDate":"2016-08-01","Securities_No_Mon1_3":"JGB #300(10)Total","Lending_Fee_Mon1_3":"268618.000000000","Trust_Fee_Mon1_3":"89529.000000000","Consumption_Tax_Mon1_3":"7148.000000000","Trust_Fee_Tax_Included_Mon1_3":"96677.000000000","ReportLanguage":"ja","SectionType":"A"},{"sectionType":"A","ClientAndBenificiary":"全国共済水産業協同組合連合会","DepartmentNameOfLender":"財務運用部 御中","TrustNoJapanese":"6018","ContractSignDate":"2013-04-23","TrustNo":"6018","ReportStartDate":"2016-07-01","EndStartDate":"2016-07-31","ReportPeriod":"2016-07-01から2016-07-31まで","Currency":"円","ShowLoanValue":"0","ShowCleanPrice":"0","ShowAccruedInt":"0","ShowDirtyPrice":"0","UDF1":"0.08","UDF2":"","ReportFrequency":"","QtrReportStartDate":"2016-07-01","QtrReportEndDate":"2016-08-01","Securities_No_Mon1_3":"JGB #305(10)Total","Lending_Fee_Mon1_3":"538950.000000000","Trust_Fee_Mon1_3":"179641.000000000","Consumption_Tax_Mon1_3":"14354.000000000","Trust_Fee_Tax_Included_Mon1_3":"193995.000000000","ReportLanguage":"ja","SectionType":"A"}]
I have added the JRXML and Json I am trying to load. When I pass dataSourceExpression in dataset I am getting only 2 rows but in source data there are three rows. Please help me to resolve this
For displaying data in table component in Jasper we need to setup new data set apart from main report data set. we can write any dummy query in main report data set like 'select 1 from dual;' in case database is mysql.

How can I hide cross tab column when all data is zero?

How to hide the column generated by measure (in details section) in cross tab when all the values are 0. Currently am getting a column with zero values. Can anyone point a solution?
jrxml code
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.0.1.final using JasperReports Library version 6.0.0 -->
<!-- 2016-02-23T23:05:34 -->
<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="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="48809477-2290-4dda-a6f9-5d348ff0b70b">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
<style name="Crosstab_CH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Crosstab_CG" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Crosstab_CT" mode="Opaque" backcolor="#005FB3">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Crosstab_CD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Crosstab 1_CH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Crosstab 1_CG" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Crosstab 1_CT" mode="Opaque" backcolor="#005FB3">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Crosstab 1_CD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Style1" isBlankWhenNull="true"/>
<style name="Crosstab 2_CH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Crosstab 2_CG" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Crosstab 2_CT" mode="Opaque" backcolor="#005FB3">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Crosstab 2_CD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<queryString language="SQL">
<![CDATA[select
id,
name,
cost,
0 as new
from product]]>
</queryString>
<field name="ID" class="java.lang.Integer"/>
<field name="NAME" class="java.lang.String"/>
<field name="COST" class="java.math.BigDecimal"/>
<field name="NEW" class="java.lang.Integer"/>
<background>
<band splitType="Stretch"/>
</background>
<summary>
<band height="352" splitType="Stretch">
<crosstab>
<reportElement x="10" y="40" width="299" height="120" uuid="05be91e1-9bd6-407e-8feb-ad21aedcb054"/>
<rowGroup name="ID1" width="60">
<bucket class="java.lang.Integer">
<bucketExpression><![CDATA[$F{ID}]]></bucketExpression>
</bucket>
<crosstabRowHeader>
<cellContents mode="Opaque" style="Crosstab 2_CH">
<textField>
<reportElement x="0" y="0" width="60" height="20" uuid="ed1b3cbe-2a65-4ee8-9882-50b1817b941c"/>
<textFieldExpression><![CDATA[$V{ID1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabRowHeader>
<crosstabTotalRowHeader>
<cellContents>
<staticText>
<reportElement x="0" y="0" width="-2147483648" height="-2147483648" uuid="9c778658-e79c-4919-8e40-196b735ce152"/>
<text><![CDATA[Total ID1]]></text>
</staticText>
</cellContents>
</crosstabTotalRowHeader>
</rowGroup>
<columnGroup name="NAME1" height="20">
<bucket class="java.lang.String">
<bucketExpression><![CDATA[$F{NAME}]]></bucketExpression>
</bucket>
<crosstabColumnHeader>
<cellContents mode="Opaque" style="Crosstab 2_CH">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="60" height="20" isRemoveLineWhenBlank="true" uuid="a705ac4c-f769-4b2b-84ae-62965d542558"/>
<textFieldExpression><![CDATA[$V{NAME1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabColumnHeader>
<crosstabTotalColumnHeader>
<cellContents>
<staticText>
<reportElement x="0" y="0" width="-2147483648" height="-2147483648" uuid="70643653-511b-4b84-8d7c-e0cc09aac39e"/>
<text><![CDATA[Total NAME1]]></text>
</staticText>
</cellContents>
</crosstabTotalColumnHeader>
</columnGroup>
<measure name="NEW_MEASURE1" class="java.lang.Integer" calculation="Sum">
<measureExpression><![CDATA[$F{NEW}]]></measureExpression>
</measure>
<crosstabCell width="60" height="20">
<cellContents mode="Opaque" style="Crosstab 2_CD">
<textField isBlankWhenNull="true">
<reportElement x="0" y="0" width="60" height="20" isRemoveLineWhenBlank="true" uuid="b0423e55-9ba8-4bc8-b032-5773c2e71ce1">
<printWhenExpression><![CDATA[$V{NEW_MEASURE1}==null?true:false]]></printWhenExpression>
</reportElement>
<textFieldExpression><![CDATA[($V{NEW_MEASURE1}.intValue()==0)?null:$V{NEW_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="60" height="20" columnTotalGroup="NAME1">
<cellContents mode="Opaque" style="Crosstab 2_CT">
<textField>
<reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="df784b91-a1cc-4cd6-b7f8-56a271e0947a"/>
<textFieldExpression><![CDATA[$V{NEW_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="60" height="20" rowTotalGroup="ID1">
<cellContents mode="Opaque" style="Crosstab 2_CT">
<textField>
<reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="70e0669b-1684-4cc8-8671-0c29ac37921c"/>
<textFieldExpression><![CDATA[$V{NEW_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
<crosstabCell width="60" height="20" rowTotalGroup="ID1" columnTotalGroup="NAME1">
<cellContents mode="Opaque" style="Crosstab 2_CT">
<textField>
<reportElement x="0" y="0" width="60" height="20" forecolor="#FFFFFF" uuid="1da6c415-c92a-4624-aae2-59802fe85538"/>
<textFieldExpression><![CDATA[$V{NEW_MEASURE1}]]></textFieldExpression>
</textField>
</cellContents>
</crosstabCell>
</crosstab>
</band>
</summary>
</jasperReport>
Edit: Can not filtering in query since it result in less no of rows. I like to show row even if column value is 0.
You can't remove the entire column in jrxml after the report have been filled, hence what you need means that the report has to be filled first (need to loop all records to see if all is 0).
Your solutions are:
Finding the correct query sql with correct filter (where) that allow you to keep the records but not include the value that is generating the column.
Using pre query's (in example java) to understand how the final query should be pass this query to jasper report via parameter.
Use dynamic-reports or dynamic-jasper, generating the report dynamically first looping datasource to find which columns need to be included.
Post elaborate the Jasper Print before export, deleting and moving objects.

Error filling print, Could not resolve style(s):{blank_style_name}

I have a problem with iReport, I am using iReport Designer 5.0.1.
It said that the iReport can not resolve styles, but it didn't tell which style is it. Only blank name after colon. And the most vague things is, the style is working in my other jrxml report files.
This is my style codes:
<style name="Kolom" mode="Opaque" forecolor="#FFFFFF" backcolor="#757575" fill="Solid" vAlign="Middle" fontName="Serif" fontSize="12" isBold="false">
<box topPadding="2" leftPadding="4" bottomPadding="2" rightPadding="2">
<pen lineWidth="0.55" lineColor="#616161"/>
<topPen lineWidth="0.55" lineColor="#616161"/>
<leftPen lineWidth="0.55" lineColor="#616161"/>
<bottomPen lineWidth="0.55" lineColor="#616161"/>
<rightPen lineWidth="0.55" lineColor="#616161"/>
</box>
<paragraph lineSpacing="Single"/>
</style>
<style name="Baris" mode="Opaque" forecolor="#666666" backcolor="#FFFFFF" fill="Solid" vAlign="Middle" fontName="Serif" fontSize="11" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false">
<pen lineWidth="1.0" lineColor="#FF6666"/>
<box topPadding="2" leftPadding="4" bottomPadding="2" rightPadding="2">
<pen lineWidth="0.55" lineColor="#CCCCFF"/>
<topPen lineWidth="0.55" lineColor="#CCCCFF"/>
<leftPen lineWidth="0.55" lineColor="#CCCCFF"/>
<bottomPen lineWidth="0.55" lineColor="#CCCCFF"/>
<rightPen lineWidth="0.55" lineColor="#CCCCFF"/>
</box>
<paragraph lineSpacing="Single"/>
</style>
And the iReport Output shows:
Error filling print... Could not resolve style(s): 
net.sf.jasperreports.engine.JRRuntimeException: Could not resolve style(s):       at net.sf.jasperreports.engine.fill.JRFillObjectFactory.checkUnresolvedReferences(JRFillObjectFactory.java:1579)      at net.sf.jasperreports.engine.fill.JRFillObjectFactory.setStyles(JRFillObjectFactory.java:1506)      at net.sf.jasperreports.engine.fill.JRBaseFiller.loadStyles(JRBaseFiller.java:1005)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:879)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:822)      at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:61)      at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446)      at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:276)      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:745)      at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:891)      at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)      at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) 
Print not filled. Try to use an EmptyDataSource...
Please look for this style="" in your jrxml file and delete all occurrences of those.
This worked for me. I hope it helps but let me know.
Good luck
I received this error while copying "Table element" from another jrxml file.
Later identified that the style information should also be copied.
Please check if this resolves your issue.

How to get rid extra space between rows in report?

I am new to JasperReports and I couldn't find a post here yet regarding extra space between rows. I have tried all possible combinations in the configuration but i still get that extra space.
Can someone point me in the right direction?
Here is my .jrxml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 5.6.1.final using JasperReports Library version 5.6.1 -->
<!-- 2014-09-24T10:15:09 -->
<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="Blank_A4_Table_Based2" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="fc97a963-c0b6-4c19-a348-7e2773e092a3">
<property name="template.engine" value="tabular_template"/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="New Data Adapter (8)"/>
<style name="Table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
<topPen lineWidth="1.0" lineColor="#000000"/>
<leftPen lineWidth="1.0" lineColor="#000000"/>
<bottomPen lineWidth="1.0" lineColor="#000000"/>
<rightPen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="Table_TH" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Opaque" backcolor="#EFEFEF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<subDataset name="tableDataset" uuid="0a703f7e-a572-40e6-b9a7-1408781b7b0c">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="New Data Adapter (8)"/>
<queryString>
<![CDATA[]]>
</queryString>
<group name="Group1"/>
</subDataset>
<queryString>
<![CDATA[]]>
</queryString>
<field name="userId" class="java.lang.String"/>
<field name="userType" class="java.lang.String"/>
<title>
<band height="79" splitType="Stretch"/>
</title>
<columnHeader>
<band>
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</band>
</columnHeader>
<detail>
<band height="40" splitType="Immediate">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField isBlankWhenNull="false">
<reportElement stretchType="RelativeToBandHeight" mode="Opaque" x="20" y="20" width="100" height="20" isRemoveLineWhenBlank="true" uuid="bf862bec-5e45-4ac1-9d66-5a2e62e7007d"/>
<textFieldExpression><![CDATA[$F{userId}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band height="10" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</band>
</pageFooter>
<summary>
<band height="20" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</band>
</summary>
</jasperReport>

Table using dataset not rendering

I am trying below JRXML to render data from CSV datasource. This JRXML has bar chart as well as table taking data from same CSV datasource. Bar chart is getting rendered without any issue, but table is not getting rendered. Please advise.
I am using Jaspersoft Studio 5.1.0 for report development.
My JRXML:
<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="AEReport_1" pageWidth="800" pageHeight="842" columnWidth="760" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="155eb524-de3b-4d18-98af-83ffc65bff68">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="V2_FLAT_FILE_CSV"/>
<style name="table">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table_TH" mode="Opaque" backcolor="#B8860B">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_CH" mode="Opaque" backcolor="#FFEDBF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#FFFAEF"/>
</conditionalStyle>
</style>
<style name="table 1">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 2">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 2_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 2_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 2_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 3">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 3_TH" mode="Opaque" backcolor="#BD955F">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 3_CH" mode="Opaque" backcolor="#E6DCCF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 3_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#F8F6F3"/>
</conditionalStyle>
</style>
<style name="table 4">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 4_TH" mode="Opaque" backcolor="#D2B48C">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 4_CH" mode="Opaque" backcolor="#FFE4BF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 4_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#FFF8EF"/>
</conditionalStyle>
</style>
<style name="table 5">
<box>
<pen lineWidth="1.0" lineColor="#000000"/>
</box>
</style>
<style name="table 5_TH" mode="Opaque" backcolor="#BD955F">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 5_CH" mode="Opaque" backcolor="#E6DCCF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="table 5_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#F8F6F3"/>
</conditionalStyle>
</style>
<style name="Table_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 1_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 1_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 1_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#FBFDFF"/>
</conditionalStyle>
</style>
<style name="Table 2_TH" mode="Opaque" backcolor="#F0F8FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 2_CH" mode="Opaque" backcolor="#BFE1FF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 2_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 3_TH" mode="Opaque" backcolor="#DEB887">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 3_CH" mode="Opaque" backcolor="#FFE3BF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
</style>
<style name="Table 3_TD" mode="Opaque" backcolor="#FFFFFF">
<box>
<pen lineWidth="0.5" lineColor="#000000"/>
<topPen lineWidth="0.5" lineColor="#000000"/>
<leftPen lineWidth="0.5" lineColor="#000000"/>
<bottomPen lineWidth="0.5" lineColor="#000000"/>
<rightPen lineWidth="0.5" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression>
<style backcolor="#F6EDE1"/>
</conditionalStyle>
</style>
<subDataset name="Table Dataset 1" uuid="3e8114ed-92a8-4069-89a5-fbdb253c6ce9"/>
<subDataset name="Table Dataset A" uuid="2e726566-2d24-49ba-84bb-5994c8f9d50b">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="V2_FLAT_FILE_CSV"/>
<parameter name="dateFrom" class="java.lang.String"/>
<parameter name="dateTo" class="java.lang.String"/>
<queryString language="csv">
<![CDATA[]]>
</queryString>
<field name="COUNT" class="java.math.BigDecimal"/>
<field name="ANLYS_DATE" class="java.lang.String"/>
<field name="APP_MNEMONIC" class="java.lang.String"/>
</subDataset>
<subDataset name="Table Dataset B" uuid="9b3ebb93-6694-430d-80fe-625fdfaae930">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="V2_FLAT_FILE_CSV"/>
<parameter name="dateFrom" class="java.lang.String"/>
<parameter name="dateTo" class="java.lang.String"/>
<queryString language="csv">
<![CDATA[]]>
</queryString>
<field name="COUNT" class="java.math.BigDecimal"/>
<field name="ANLYS_DATE" class="java.lang.String"/>
<field name="APP_MNEMONIC" class="java.lang.String"/>
<group name="APP_MNEMONIC">
<groupExpression><![CDATA[$F{APP_MNEMONIC}]]></groupExpression>
</group>
<group name="ANLYS_DATE">
<groupExpression><![CDATA[$F{ANLYS_DATE}]]></groupExpression>
</group>
</subDataset>
<parameter name="dateFrom" class="java.lang.String"/>
<parameter name="dateTo" class="java.lang.String"/>
<parameter name="reportUser" class="java.lang.String"/>
<queryString language="csv">
<![CDATA[]]>
</queryString>
<field name="COUNT" class="java.math.BigDecimal"/>
<field name="ANLYS_DATE" class="java.lang.String"/>
<field name="APP_MNEMONIC" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="79" splitType="Stretch">
<image>
<reportElement uuid="667e0ea3-a911-4d00-8067-2e89b3780fda" x="0" y="0" width="136" height="54"/>
<imageExpression><![CDATA["C:\\Users\\ADCXDPF\\Desktop\\bnymellon.png"]]></imageExpression>
</image>
<textField pattern="">
<reportElement uuid="7a842faa-9b66-489a-90ad-5375cd1272de" x="230" y="30" width="253" height="33"/>
<textElement textAlignment="Center">
<font size="16" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA["Throughput Summary Report"]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="100" splitType="Stretch">
<textField>
<reportElement uuid="d119d0a9-8b20-4a5e-aee6-e16cee9b228c" x="100" y="43" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$P{dateFrom}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="c931fbfb-d41d-4890-979d-570cdd1d3d49" x="0" y="4" width="100" height="20"/>
<textElement>
<font isBold="true"/>
</textElement>
<text><![CDATA[Report Parameters]]></text>
</staticText>
<textField>
<reportElement uuid="496c107b-9e9f-4e50-8cf4-0d158c2d3c1d" x="100" y="24" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$P{reportUser}]]></textFieldExpression>
</textField>
<staticText>
<reportElement uuid="f89feee2-3b9d-43cf-b738-386b96dd005c" x="0" y="24" width="100" height="20"/>
<textElement/>
<text><![CDATA[User :]]></text>
</staticText>
<staticText>
<reportElement uuid="56beec91-5509-4cdb-8155-54dfae54296f" x="0" y="43" width="100" height="20"/>
<textElement/>
<text><![CDATA[Date From :]]></text>
</staticText>
<staticText>
<reportElement uuid="a0cc21e8-1610-4f72-b729-f90648762326" x="0" y="63" width="100" height="20"/>
<textElement/>
<text><![CDATA[Date To : ]]></text>
</staticText>
<textField>
<reportElement uuid="b9df36a8-4fac-4eb4-91a2-970179703202" x="100" y="63" width="100" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[$P{dateTo}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<detail>
<band height="549" splitType="Stretch">
<printWhenExpression><![CDATA[$V{REPORT_COUNT} == 1]]></printWhenExpression>
<line>
<reportElement uuid="64346d62-eee3-493a-b044-39c4b06419d4" x="-18" y="257" width="778" height="1"/>
</line>
<line>
<reportElement uuid="51143f56-11c9-4c86-adaf-6a9567e55dcd" x="-18" y="4" width="778" height="3"/>
</line>
<staticText>
<reportElement uuid="d649fb76-7f5b-4777-ba74-eec842bc3620" x="200" y="7" width="159" height="20"/>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Activity Summary By Date]]></text>
</staticText>
<barChart>
<chart isShowLegend="false" evaluationTime="Report">
<reportElement uuid="21819f57-e2b0-4d97-b0c3-212eaeb45b81" x="-1" y="37" width="521" height="208"/>
<chartTitle>
<titleExpression><![CDATA[]]></titleExpression>
</chartTitle>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<categorySeries>
<seriesExpression><![CDATA[$F{ANLYS_DATE}]]></seriesExpression>
<categoryExpression><![CDATA[$F{ANLYS_DATE}]]></categoryExpression>
<valueExpression><![CDATA[$F{COUNT}]]></valueExpression>
</categorySeries>
</categoryDataset>
<barPlot isShowTickMarks="false">
<plot>
<seriesColor seriesOrder="0" color="#B08057"/>
<seriesColor seriesOrder="1" color="#8599A8"/>
<seriesColor seriesOrder="2" color="#94996E"/>
<seriesColor seriesOrder="3" color="#667D78"/>
<seriesColor seriesOrder="4" color="#8F6678"/>
<seriesColor seriesOrder="5" color="#A3A19E"/>
</plot>
<itemLabel/>
<categoryAxisLabelExpression><![CDATA["Processing Date"]]></categoryAxisLabelExpression>
<categoryAxisFormat>
<axisFormat>
<labelFont>
<font isBold="true"/>
</labelFont>
</axisFormat>
</categoryAxisFormat>
<valueAxisLabelExpression><![CDATA["Total Hit"]]></valueAxisLabelExpression>
<valueAxisFormat>
<axisFormat>
<labelFont>
<font isBold="true"/>
</labelFont>
</axisFormat>
</valueAxisFormat>
</barPlot>
</barChart>
<lineChart>
<chart isShowLegend="true">
<reportElement uuid="41772b49-87de-4350-9ad0-00a78f5246d0" x="1" y="288" width="459" height="207"/>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<categorySeries>
<seriesExpression><![CDATA[$F{APP_MNEMONIC}]]></seriesExpression>
<categoryExpression><![CDATA[$F{ANLYS_DATE}]]></categoryExpression>
<valueExpression><![CDATA[$F{COUNT}]]></valueExpression>
</categorySeries>
</categoryDataset>
<linePlot>
<plot>
<seriesColor seriesOrder="0" color="#B08057"/>
<seriesColor seriesOrder="1" color="#8599A8"/>
<seriesColor seriesOrder="2" color="#94996E"/>
<seriesColor seriesOrder="3" color="#667D78"/>
<seriesColor seriesOrder="4" color="#8F6678"/>
<seriesColor seriesOrder="5" color="#A3A19E"/>
</plot>
<categoryAxisLabelExpression><![CDATA["Processing Date"]]></categoryAxisLabelExpression>
<categoryAxisFormat>
<axisFormat>
<labelFont>
<font isBold="true"/>
</labelFont>
<tickLabelFont>
<font isBold="true"/>
</tickLabelFont>
</axisFormat>
</categoryAxisFormat>
<valueAxisLabelExpression><![CDATA["Total Hit"]]></valueAxisLabelExpression>
<valueAxisFormat>
<axisFormat>
<labelFont>
<font isBold="true"/>
</labelFont>
</axisFormat>
</valueAxisFormat>
</linePlot>
</lineChart>
<staticText>
<reportElement uuid="72fb52e9-7c93-40bc-a6eb-3adcf0f5c10f" x="200" y="260" width="193" height="20"/>
<textElement>
<font size="12" isBold="true"/>
</textElement>
<text><![CDATA[Activity Summary By Application]]></text>
</staticText>
<componentElement>
<reportElement uuid="6bd73234-2b4b-4f40-a95b-43b0f04a041e" x="540" y="20" width="200" height="160" isRemoveLineWhenBlank="true" isPrintInFirstWholeBand="true"/>
<jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd">
<datasetRun subDataset="Table Dataset A" uuid="4ca25032-c8da-46c0-a75f-0ad3f60b0571">
<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>
</datasetRun>
<jr:column width="100" uuid="fbb13626-5aad-4322-ba9e-80cdfe4a55e8">
<jr:tableHeader style="Table 3_TH" height="30"/>
<jr:tableFooter style="Table 3_TH" height="30"/>
<jr:columnHeader style="Table 3_CH" height="30">
<staticText>
<reportElement uuid="403cc6c2-c57e-4741-840d-57c1269a7551" x="0" y="0" width="100" height="30"/>
<textElement/>
<text><![CDATA[ANLYS_DATE]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table 3_CH" height="30"/>
<jr:detailCell style="Table 3_TD" height="30">
<textField>
<reportElement uuid="c80f6de6-0114-482b-91d2-d0ffee0c5481" x="0" y="0" width="100" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$F{ANLYS_DATE}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
<jr:column width="100" uuid="07468b4f-03a5-4f62-97c8-a0489c687664">
<jr:tableHeader style="Table 3_TH" height="30"/>
<jr:tableFooter style="Table 3_TH" height="30"/>
<jr:columnHeader style="Table 3_CH" height="30">
<staticText>
<reportElement uuid="3e081981-714d-434b-b7eb-2a0109559506" x="0" y="0" width="100" height="30"/>
<textElement/>
<text><![CDATA[COUNT]]></text>
</staticText>
</jr:columnHeader>
<jr:columnFooter style="Table 3_CH" height="30"/>
<jr:detailCell style="Table 3_TD" height="30">
<textField>
<reportElement uuid="0fba778b-3de3-49fb-8176-97ff6d73a785" x="0" y="0" width="100" height="30"/>
<textElement/>
<textFieldExpression><![CDATA[$F{COUNT}]]></textFieldExpression>
</textField>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</detail>
<pageFooter>
<band height="31" splitType="Stretch">
<staticText>
<reportElement uuid="e8424fab-a95e-4c89-8af0-a0d12a89ff1b" x="1" y="9" width="100" height="20"/>
<textElement/>
<text><![CDATA[Run Date :]]></text>
</staticText>
<textField>
<reportElement uuid="2abd8771-abef-4722-8526-69abf4e81630" x="633" y="9" width="80" height="20"/>
<textElement textAlignment="Right"/>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement uuid="a1bb581a-8214-4074-be04-5493e100c787" x="713" y="9" width="40" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField pattern="MM/dd/yyyy HH:mm:ss">
<reportElement uuid="dbacf251-c81f-4e05-82ab-029d82139e0b" x="51" y="9" width="164" height="20"/>
<textElement/>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</band>
</pageFooter>
</jasperReport>
CSV data is:
"COUNT","ANLYS_DATE","APP_MNEMONIC"
9932,"2013-08-27","ESD"
1132,"2013-08-26","ESD"
2532,"2013-08-25","ESD"
902,"2013-08-27","JMETER"
920,"2013-08-26","JMETER"
1120,"2013-08-25","JMETER"
1109,"2013-08-27","LND"
2229,"2013-08-26","LND"
9999,"2013-08-25","LND"
11646,"2013-08-24","SPU"
1646,"2013-08-26","SPU"
111646,"2013-08-27","SPU"
Please try this
You need a subdatset for the Table
Right click on the Table .Edit table datasource. Choose the datasource you need. In the connection/Datasource Expression
Choose -->"Use datasource Expression"
Use the following in the expression
((net.sf.jasperreports.engine.data.JRCsvDataSource) $P{REPORT_DATA_SOURCE})
Thanks