Jasperreports Studio throws a runtime error during preview when the contents of a table cell (Text field) is large. Important thing here is that the Text field need to have its Stretch With Overflow property set to True
Following is the exception thrown:
net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: Infinite loop creating new page due to column header overflow.
at com.jaspersoft.studio.editor.preview.view.control.ReportController.fillReport(ReportController.java:536)
at com.jaspersoft.studio.editor.preview.view.control.ReportController.access$17(ReportController.java:511)
at com.jaspersoft.studio.editor.preview.view.control.ReportController$1.run(ReportController.java:429)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: net.sf.jasperreports.engine.JRRuntimeException: Infinite loop creating new page due to column header overflow.
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnHeader(JRVerticalFiller.java:534)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:154)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:615)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:822)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:61)
at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
This issue can be reproduced in multiple ways but I am using simplest scenario. I have attached simple jrxml file for reference. I have used a table with empty data set. I have used Text Field expression to display data. I have set isStretchWithOverflow to true.
JRXML
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0 -->
<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="Table_Based" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="66519d71-4f27-4833-9a1d-c9b72e811f0c">
<property name="template.engine" value="tabular_template"/>
<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
<style name="Title" fontName="Times New Roman" fontSize="50" isBold="true"/>
<style name="SubTitle" forecolor="#736343" fontName="Arial" fontSize="18"/>
<style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/>
<style name="Row" mode="Transparent">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
<style backcolor="#E6DAC3"/>
</conditionalStyle>
</style>
<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="#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>
<subDataset name="tableDataset" uuid="bcc32bbf-2279-43e0-8149-66ee3e913b5e">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Sample DB"/>
<queryString language="SQL">
<![CDATA[]]>
</queryString>
</subDataset>
<subDataset name="Dataset1" uuid="13d74fad-eb9b-446f-a81d-55b8cf6ea0db">
<queryString>
<![CDATA[]]>
</queryString>
</subDataset>
<queryString>
<![CDATA[]]>
</queryString>
<title>
<band height="113" splitType="Stretch">
<staticText>
<reportElement style="Title" x="270" y="0" width="263" height="62" uuid="a080d2ca-6207-4d8e-87c9-d3b61fb495a9"/>
<textElement verticalAlignment="Middle"/>
<text><![CDATA[Report Title]]></text>
</staticText>
<staticText>
<reportElement style="SubTitle" x="303" y="62" width="196" height="22" uuid="0d849401-f944-4163-9df0-f69408a0618a"/>
<textElement>
<font fontName="Times New Roman"/>
</textElement>
<text><![CDATA[Report SubTitle]]></text>
</staticText>
</band>
</title>
<summary>
<band height="112" splitType="Stretch">
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.grid.JSSGridBagLayout"/>
<componentElement>
<reportElement stretchType="ContainerBottom" x="0" y="0" width="802" height="112" isPrintWhenDetailOverflows="true" uuid="f3767496-0434-4f42-862b-5839d580e423">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/>
<property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/>
<property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/>
<property name="com.jaspersoft.studio.table.style.detail" value="Table_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" whenNoDataType="AllSectionsNoDetail">
<datasetRun subDataset="Dataset1" uuid="05c4f663-c370-4c53-b332-ae9dfb9590e0"/>
<jr:column width="170" uuid="a3e3c62f-3558-42a1-a701-ad31853970a9">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column1"/>
<jr:tableHeader style="Table_TH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="170" height="30" uuid="a5ddd2d9-992d-41d2-a7d0-4cc7ec29350b"/>
<textElement>
<font size="20"/>
</textElement>
<text><![CDATA[Number]]></text>
</staticText>
</jr:tableHeader>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<textField>
<reportElement positionType="Float" stretchType="ElementGroupHeight" x="0" y="0" width="170" height="30" uuid="b4f24d97-8dbe-42e8-81a8-34fb336eabef"/>
<textFieldExpression><![CDATA[$V{REPORT_COUNT}]]></textFieldExpression>
</textField>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="40" rowSpan="1"/>
</jr:column>
<jr:column width="173" uuid="e2eaa014-ebfd-4795-b752-476ca2fa8f0b">
<property name="com.jaspersoft.studio.components.table.model.column.name" value="Column2"/>
<jr:tableHeader style="Table_TH" height="30" rowSpan="1">
<staticText>
<reportElement x="0" y="0" width="173" height="30" uuid="b80ae7ce-3491-45cd-963d-8638f03a3891"/>
<textElement>
<font size="20"/>
</textElement>
<text><![CDATA[Text]]></text>
</staticText>
</jr:tableHeader>
<jr:columnHeader style="Table_CH" height="30" rowSpan="1">
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" x="0" y="0" width="173" height="30" isPrintWhenDetailOverflows="true" uuid="a2647f94-9054-4efd-904e-0850eead4cdf"/>
<textElement>
<paragraph lineSpacing="1_1_2"/>
</textElement>
<textFieldExpression><![CDATA[UPPER("qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm qwertyuiopasdfghjklzxcvbnm")]]></textFieldExpression>
</textField>
</jr:columnHeader>
<jr:detailCell style="Table_TD" height="40">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/>
</jr:detailCell>
</jr:column>
</jr:table>
</componentElement>
</band>
</summary>
In similarly scenario Jasperreports server throws a different runtime exception:
It appears to be some kind of bug. Any help would be great help.
2018-09-21 17:03:26,667 ERROR RenderViewExceptionInterceptor,http-nio-8080-exec-8:55 - Internal server error occurred. Please contact your system administrator.
java.lang.NullPointerException
at net.sf.jasperreports.components.table.util.TableUtil.getAllColumns(TableUtil.java:162)
at net.sf.jasperreports.components.headertoolbar.json.HeaderToolbarElementJsonHandler.getColumnGroupsData(HeaderToolbarElementJsonHandler.java:832)
at net.sf.jasperreports.components.headertoolbar.json.HeaderToolbarElementJsonHandler.getJsonFragment(HeaderToolbarElementJsonHandler.java:237)
at net.sf.jasperreports.engine.export.JsonExporter.exportGenericElement(JsonExporter.java:487)
You need to redesign your report.
Currently you want a column header on each page, but your column header does not fit on page, so what happens is.
Create column header (because start of table or new page)
Break to new page (since it does not fit).
Go to 1 since new page.
net.sf.jasperreports.engine.JRRuntimeException: Infinite loop creating new page due to column header overflow.
Your solution can be all from making text smaller, column larger or truncate text so that it fits in page.
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 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.
I need you help.
The problem is as follows:
I created the report.
I want to add this report on dashboard. But there is a problem. When I add this report on dashboard, the View button isn't displayed. View - text field.
Why does this occur? and how to make so that "View" also is displayed?
Source code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0 -->
<!-- 2016-01-26T23:23:55 -->
<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="Summary_Clicks Report_2" pageWidth="612" pageHeight="792" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isFloatColumnFooter="true" uuid="9ac8b394-36b0-409a-8a94-b8147d9c2d20">
<property name="net.sf.jasperreports.export.xls.collapse.row.span" value="false"/>
<property name="net.sf.jasperreports.export.html.border.collapse" value="separate"/>
<property name="net.sf.jasperreports.export.docx.frames.as.nested.tables" value="false"/>
<property name="com.jaspersoft.jasperserver.adhoc.actual.size" value="true"/>
<property name="com.jaspersoft.jasperserver.adhoc.group.indent" value="0"/>
<property name="com.jaspersoft.jasperserver.adhoc.min.group.label.width" value="100"/>
<property name="com.jaspersoft.jasperserver.adhoc.detail.band.height" value="25"/>
<property name="com.jaspersoft.jasperserver.adhoc.header.band.height" value="25"/>
<property name="com.jaspersoft.jasperserver.adhoc.crosstab.row.header.width" value="125"/>
<property name="com.jaspersoft.jasperserver.adhoc.crosstab.cell.width" value="100"/>
<property name="com.jaspersoft.jasperserver.adhoc.crosstab.cell.height" value="20"/>
<property name="com.jaspersoft.ji.adhoc" value="1"/>
<property name="com.jaspersoft.ji.adhoc.preferredDataStrategy" value="domainDataStrategy"/>
<property name="net.sf.jasperreports.export.pdf.tagged" value="true"/>
<property name="net.sf.jasperreports.export.pdf.tag.language" value="EN-US"/>
<property name="net.sf.jasperreports.text.truncate.suffix" value="..."/>
<property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
<property name="net.sf.jasperreports.export.xls.ignore.graphics" value="false"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="false"/>
<property name="ireport.jasperserver.url" value="http://stats.trackif.com/jasperserver-pro/services/repository/"/>
<property name="ireport.jasperserver.user" value="superuser"/>
<property name="ireport.jasperserver.reportUnit" value="/organizations/organization_1/reports/Summary_Clicks_Report_2"/>
<property name="ireport.jasperserver.report.resource" value="/organizations/organization_1/reports/Summary_Clicks_Report_2_files/mainReportJrxml"/>
<import value="com.jaspersoft.ji.adhoc.jr.AdhocReportUtils"/>
<import value="com.jaspersoft.ji.adhoc.service.AdhocEngineServiceImpl"/>
<style name="ReportDefault" isDefault="true" mode="Transparent" forecolor="#666666" backcolor="#FFFFFF" hTextAlign="Left" hImageAlign="Left" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11">
<box>
<pen lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableBaseFrameStyle" mode="Transparent">
<box padding="0">
<pen lineWidth="0.0"/>
</box>
</style>
<style name="TableFrameStyle" style="TableBaseFrameStyle">
<box padding="1">
<topPen lineWidth="1.0" lineColor="#AAAAAA"/>
<leftPen lineWidth="1.0" lineColor="#AAAAAA"/>
<bottomPen lineWidth="1.0" lineColor="#AAAAAA"/>
<rightPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableColumnHeaderFrameStyle" style="TableBaseFrameStyle">
<box>
<topPen lineWidth="1.0" lineColor="#AAAAAA"/>
<leftPen lineWidth="1.0" lineColor="#AAAAAA"/>
<bottomPen lineWidth="1.0" lineColor="#AAAAAA"/>
<rightPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableColumnFooterFrameStyle" style="TableBaseFrameStyle">
<box>
<topPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableColumnHeaderTextStyle" style="ReportDefault" mode="Opaque" forecolor="#666666" backcolor="#D5DEE8" hTextAlign="Left" hImageAlign="Left" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11" isBold="true">
<box leftPadding="5" rightPadding="5">
<pen lineWidth="1.0" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineColor="#FFFFFF"/>
<leftPen lineWidth="1.0" lineColor="#FFFFFF"/>
<bottomPen lineWidth="1.0" lineColor="#B1B6BB"/>
<rightPen lineWidth="1.0" lineColor="#B1B6BB"/>
</box>
</style>
<style name="TableGroupHeaderFrameStyle" style="TableBaseFrameStyle" mode="Opaque" backcolor="#E3E9EF">
<box>
<topPen lineWidth="1.0" lineColor="#B1B6BB"/>
</box>
</style>
<style name="TableGroupHeaderTextStyle" style="ReportDefault" mode="Opaque" forecolor="#666666" backcolor="#E3E9EF" hTextAlign="Left" hImageAlign="Left" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11" isBold="true">
<box leftPadding="5" rightPadding="5">
<topPen lineWidth="1.0" lineColor="#B1B6BB"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
</style>
<style name="TableGroupFooterFrameStyle" style="TableBaseFrameStyle" mode="Opaque" backcolor="#E7ECF2">
<box>
<topPen lineWidth="1.0" lineColor="#E3E9EF"/>
<leftPen lineWidth="1.0" lineColor="#E3E9EF"/>
<bottomPen lineWidth="1.0" lineColor="#E3E9EF"/>
<rightPen lineWidth="1.0" lineColor="#E3E9EF"/>
</box>
</style>
<style name="TableGroupFooterTextStyle" style="ReportDefault" mode="Opaque" forecolor="#666666" backcolor="#E7ECF2" hTextAlign="Left" hImageAlign="Left" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11" isBold="true">
<box leftPadding="5" rightPadding="5">
<topPen lineWidth="1.0" lineColor="#E3E9EF"/>
<leftPen lineWidth="1.0" lineColor="#E3E9EF"/>
<bottomPen lineWidth="1.0" lineColor="#E3E9EF"/>
<rightPen lineWidth="1.0" lineColor="#E3E9EF"/>
</box>
</style>
<style name="TableSummaryFrameStyle" style="TableBaseFrameStyle">
<box>
<leftPen lineWidth="1.0" lineColor="#AAAAAA"/>
<rightPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableSummaryTextNoBorderStyle" style="ReportDefault" mode="Opaque" forecolor="#666666" fontName="DejaVu Sans" isBold="true">
<box leftPadding="5" rightPadding="5"/>
</style>
<style name="TableSummaryTextStyle" style="TableSummaryTextNoBorderStyle">
<box>
<pen lineWidth="1.0"/>
</box>
</style>
<style name="TableTitleFrameStyle" style="TableFrameStyle">
<box topPadding="0" bottomPadding="0">
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
</style>
<style name="TableTitleTextStyle" style="ReportDefault" mode="Opaque" forecolor="#333333" backcolor="#FFFFFF" hTextAlign="Center" hImageAlign="Center" fontSize="18" isBold="false">
<box bottomPadding="8">
<pen lineColor="#000000"/>
<topPen lineWidth="0.0"/>
</box>
</style>
<style name="TableDetailFrameStyle" style="TableBaseFrameStyle">
<box>
<leftPen lineWidth="1.0" lineColor="#AAAAAA"/>
<rightPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableDetailTextStyle" style="ReportDefault" mode="Opaque" forecolor="#666666" backcolor="#FFFFFF" hTextAlign="Left" hImageAlign="Left" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11" isBold="false">
<box leftPadding="5" rightPadding="5">
<pen lineWidth="1.0" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineColor="#E3E9EF"/>
<leftPen lineWidth="1.0" lineColor="#E3E9EF"/>
<bottomPen lineWidth="1.0" lineColor="#E3E9EF"/>
<rightPen lineWidth="1.0" lineColor="#E3E9EF"/>
</box>
</style>
<style name="ChartReportTitle" style="ReportDefault" mode="Opaque" forecolor="#333333" backcolor="#FFFFFF" hTextAlign="Center" hImageAlign="Center" fontSize="18" isBold="false">
<box>
<pen lineColor="#000000"/>
<topPen lineWidth="0.0" lineStyle="Solid"/>
</box>
</style>
<style name="ChartTitle" forecolor="#000000" fontName="DejaVu Sans" fontSize="12" isBold="true"/>
<style name="ChartSubtitle" forecolor="#000000" fontName="DejaVu Sans" fontSize="9" isBold="false"/>
<style name="ChartLegend" forecolor="#000000" backcolor="#FFFFFF" fontName="DejaVu Sans" fontSize="9" isBold="false"/>
<style name="ChartSeriesColor0" backcolor="#87C4FE"/>
<style name="ChartSeriesColor1" backcolor="#E96270"/>
<style name="ChartSeriesColor2" backcolor="#D1D1D1"/>
<style name="ChartSeriesColor3" backcolor="#FFEE99"/>
<style name="ChartSeriesColor4" backcolor="#6164FF"/>
<style name="ChartSeriesColor5" backcolor="#B0E992"/>
<style name="ChartSeriesColor6" backcolor="#AE9CEA"/>
<style name="ChartSeriesColor7" backcolor="#F5B05E"/>
<style name="ChartSeriesColor8" backcolor="#589EE1"/>
<style name="ChartSeriesColor9" backcolor="#AE4E59"/>
<style name="ChartSeriesColor10" backcolor="#747474"/>
<style name="ChartSeriesColor11" backcolor="#E2DC77"/>
<style name="ChartSeriesColor12" backcolor="#4749A5"/>
<style name="ChartSeriesColor13" backcolor="#81B963"/>
<style name="ChartSeriesColor14" backcolor="#7764B4"/>
<style name="ChartSeriesColor15" backcolor="#F27B4C"/>
<style name="ChartCategoryAxisLabelFormat" forecolor="#000000" fontName="DejaVu Sans" fontSize="11" isBold="true"/>
<style name="ChartCategoryAxisTickFormat" forecolor="#000000" fontName="DejaVu Sans" fontSize="9" isBold="false"/>
<style name="ChartValueAxisLabelFormat" forecolor="#000000" fontName="DejaVu Sans" fontSize="11" isBold="true"/>
<style name="ChartValueAxisTickFormat" forecolor="#000000" fontName="DejaVu Sans" fontSize="9" isBold="false"/>
<style name="ChartContext" backcolor="#D1CA67"/>
<style name="CrosstabElementStyle" mode="Transparent" forecolor="#000033" backcolor="#FFFFFF" hTextAlign="Center" hImageAlign="Center" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11">
<box bottomPadding="1" rightPadding="1">
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="1.0" lineColor="#AAAAAA"/>
<rightPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="CrosstabBaseCellStyle" mode="Transparent">
<box padding="0">
<pen lineWidth="0.0"/>
</box>
</style>
<style name="CrosstabBaseTextStyle" mode="Opaque" forecolor="#666666" backcolor="#FFFFFF" hTextAlign="Left" hImageAlign="Left" vTextAlign="Top" vImageAlign="Top" fontName="DejaVu Sans" fontSize="11" isBold="true">
<box topPadding="3" leftPadding="5" bottomPadding="3" rightPadding="5">
<topPen lineWidth="1.0" lineColor="#FFFFFF"/>
<leftPen lineWidth="1.0" lineColor="#FFFFFF"/>
<bottomPen lineWidth="1.0" lineColor="#B1B6BB"/>
<rightPen lineWidth="1.0" lineColor="#B1B6BB"/>
</box>
</style>
<style name="CrosstabTitleTextStyle" style="CrosstabBaseTextStyle" forecolor="#333333" fontSize="18" isBold="false">
<box>
<pen lineWidth="0.0" lineColor="#000000"/>
</box>
</style>
<style name="CrosstabHeaderTextStyle" style="CrosstabBaseTextStyle" backcolor="#D5DEE8"/>
<style name="CrosstabHeaderLabelStyle" style="CrosstabHeaderTextStyle" mode="Transparent">
<box>
<pen lineWidth="0.0"/>
</box>
</style>
<style name="CrosstabMeasureHeaderTextStyle" style="CrosstabBaseTextStyle" backcolor="#D3C8EB"/>
<style name="CrosstabMeasureHeaderLabelStyle" style="CrosstabMeasureHeaderTextStyle" mode="Transparent">
<box>
<pen lineWidth="0.0"/>
</box>
</style>
<style name="CrosstabColumnMeasureHeaderTextStyle" style="CrosstabMeasureHeaderTextStyle"/>
<style name="CrosstabRowMeasureHeaderTextStyle" style="CrosstabMeasureHeaderTextStyle" isBold="false"/>
<style name="CrosstabDimensionHeaderTextStyle" style="CrosstabBaseTextStyle" backcolor="#E7ECF2" isBold="false"/>
<style name="CrosstabDetailTextStyle" style="CrosstabBaseTextStyle" backcolor="#FFFFFF" hTextAlign="Right" hImageAlign="Right" isBold="false">
<box>
<topPen lineWidth="1.0" lineColor="#E3E9EF"/>
<leftPen lineWidth="1.0" lineColor="#E3E9EF"/>
<bottomPen lineWidth="1.0" lineColor="#E3E9EF"/>
<rightPen lineWidth="1.0" lineColor="#E3E9EF"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[$V{CROSSTAB_TOTAL_DISCRIMINATOR}]]></conditionExpression>
<style backcolor="#F0F4F8" hTextAlign="Right" hImageAlign="Right" isBold="true">
<box>
<topPen lineWidth="1.0" lineColor="#E3E9EF"/>
<leftPen lineWidth="1.0" lineColor="#E3E9EF"/>
<bottomPen lineWidth="1.0" lineColor="#E3E9EF"/>
<rightPen lineWidth="1.0" lineColor="#E3E9EF"/>
</box>
</style>
</conditionalStyle>
</style>
<style name="CrosstabDummyHeaderTextStyle" style="CrosstabBaseTextStyle" backcolor="#D4D4D4"/>
<parameter name="REPORT_TITLE" class="java.lang.String" isForPrompting="false">
<property name="net.sf.jasperreports.data.cache.included" value="true"/>
<defaultValueExpression><![CDATA[null]]></defaultValueExpression>
</parameter>
<parameter name="_JRS_ADHOC_CHART_STATE" class="java.lang.String" isForPrompting="false">
<property name="net.sf.jasperreports.data.cache.included" value="true"/>
</parameter>
<parameter name="_JRS_ADHOC_QUERY_DATA" class="java.lang.String" isForPrompting="false">
<property name="net.sf.jasperreports.data.cache.included" value="true"/>
</parameter>
<field name="summary_date" class="java.sql.Timestamp"/>
<field name="public_dashboard_by_day_materialized.clicks_count1" class="java.lang.Long">
<fieldDescription><![CDATA[public_dashboard_by_day_materialized.clicks_count1]]></fieldDescription>
</field>
<field name="public_dashboard_by_day_materialized.summary_date1" class="java.sql.Timestamp">
<fieldDescription><![CDATA[public_dashboard_by_day_materialized.summary_date1]]></fieldDescription>
</field>
<field name="Sum_clicks_count" class="java.lang.Long"/>
<title>
<band height="621" splitType="Stretch">
<property name="com.jaspersoft.studio.unit.height" value="pixel"/>
<componentElement>
<reportElement key="chart" positionType="Float" mode="Opaque" x="-11" y="70" width="572" height="265" uuid="32d0daf7-6eea-46f4-bfcf-e0f9bdb5ce46"/>
<jrhc:chart xmlns:jrhc="http://jaspersoft.com/highcharts" xsi:schemaLocation="http://jaspersoft.com/highcharts http://jaspersoft.com/schema/highcharts.xsd" type="Area" preferredHeight="353" evaluationTime="Page">
<jrhc:chartSetting name="_jrs_adhoc">
<jrhc:chartProperty name="_JRS_ADHOC_CHART_STATE">
<jrhc:propertyExpression><![CDATA[$P{_JRS_ADHOC_CHART_STATE}]]></jrhc:propertyExpression>
</jrhc:chartProperty>
<jrhc:chartProperty name="_JRS_ADHOC_QUERY_DATA">
<jrhc:propertyExpression><![CDATA[$P{_JRS_ADHOC_QUERY_DATA}]]></jrhc:propertyExpression>
</jrhc:chartProperty>
</jrhc:chartSetting>
</jrhc:chart>
</componentElement>
<textField hyperlinkType="Reference" hyperlinkTarget="Blank">
<reportElement mode="Opaque" x="240" y="30" width="119" height="30" isPrintInFirstWholeBand="true" forecolor="#FFFFFF" backcolor="#7FFF00" uuid="010a3c43-3629-455a-a522-2dad2b5e33cd">
<property name="net.sf.jasperreports.export.html.class" value="btn"/>
<property name="net.sf.jasperreports.export.html.id" value="idBtn"/>
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="24"/>
</textElement>
<textFieldExpression><![CDATA["View"]]></textFieldExpression>
<anchorNameExpression><![CDATA["myButton"]]></anchorNameExpression>
<hyperlinkReferenceExpression><![CDATA["http://google.ru"]]></hyperlinkReferenceExpression>
<hyperlinkTooltipExpression><![CDATA["Click to view"]]></hyperlinkTooltipExpression>
</textField>
</band>
</title>
</jasperReport>
I created the button in the standard report. As example. There the same problem is observed.
Maybe you will be able to reproduce this code?
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0 -->
<!-- 2016-01-27T00:02:06 -->
<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="06. Sales Mix by Gender Report" pageWidth="612" pageHeight="792" columnWidth="572" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isFloatColumnFooter="true" uuid="7bd0a5cf-8cc1-4e6d-8ed7-178a04c17a8c">
<property name="net.sf.jasperreports.export.xls.collapse.row.span" value="false"/>
<property name="net.sf.jasperreports.export.html.border.collapse" value="separate"/>
<property name="net.sf.jasperreports.export.docx.frames.as.nested.tables" value="false"/>
<property name="com.jaspersoft.jasperserver.adhoc.actual.size" value="true"/>
<property name="com.jaspersoft.jasperserver.adhoc.group.indent" value="0"/>
<property name="com.jaspersoft.jasperserver.adhoc.min.group.label.width" value="100"/>
<property name="com.jaspersoft.jasperserver.adhoc.detail.band.height" value="25"/>
<property name="com.jaspersoft.jasperserver.adhoc.header.band.height" value="25"/>
<property name="com.jaspersoft.jasperserver.adhoc.crosstab.row.header.width" value="125"/>
<property name="com.jaspersoft.jasperserver.adhoc.crosstab.cell.width" value="100"/>
<property name="com.jaspersoft.jasperserver.adhoc.crosstab.cell.height" value="20"/>
<property name="com.jaspersoft.ji.adhoc" value="1"/>
<property name="com.jaspersoft.ji.adhoc.preferredDataStrategy" value="sqlQueryDataStrategy"/>
<property name="net.sf.jasperreports.export.pdf.tagged" value="true"/>
<property name="net.sf.jasperreports.export.pdf.tag.language" value="EN-US"/>
<property name="net.sf.jasperreports.text.truncate.suffix" value="..."/>
<property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
<property name="net.sf.jasperreports.export.xls.ignore.graphics" value="false"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="false"/>
<property name="ireport.jasperserver.url" value="http://stats.trackif.com/jasperserver-pro/services/repository/"/>
<property name="ireport.jasperserver.user" value="superuser"/>
<property name="ireport.jasperserver.reportUnit" value="/public/Samples/Reports/Report_for_example"/>
<property name="ireport.jasperserver.report.resource" value="/public/Samples/Reports/Report_for_example_files/mainReportJrxml"/>
<import value="com.jaspersoft.ji.adhoc.jr.AdhocReportUtils"/>
<import value="com.jaspersoft.ji.adhoc.service.AdhocEngineServiceImpl"/>
<style name="ReportDefault" isDefault="true" mode="Transparent" forecolor="#666666" backcolor="#FFFFFF" hTextAlign="Left" hImageAlign="Left" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11">
<box>
<pen lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableBaseFrameStyle" mode="Transparent">
<box padding="0">
<pen lineWidth="0.0"/>
</box>
</style>
<style name="TableFrameStyle" style="TableBaseFrameStyle">
<box padding="1">
<topPen lineWidth="1.0" lineColor="#AAAAAA"/>
<leftPen lineWidth="1.0" lineColor="#AAAAAA"/>
<bottomPen lineWidth="1.0" lineColor="#AAAAAA"/>
<rightPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableColumnHeaderFrameStyle" style="TableBaseFrameStyle">
<box>
<topPen lineWidth="1.0" lineColor="#AAAAAA"/>
<leftPen lineWidth="1.0" lineColor="#AAAAAA"/>
<bottomPen lineWidth="1.0" lineColor="#AAAAAA"/>
<rightPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableColumnFooterFrameStyle" style="TableBaseFrameStyle">
<box>
<topPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableColumnHeaderTextStyle" style="ReportDefault" mode="Opaque" forecolor="#666666" backcolor="#D5DEE8" hTextAlign="Left" hImageAlign="Left" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11" isBold="true">
<box leftPadding="5" rightPadding="5">
<pen lineWidth="1.0" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineColor="#FFFFFF"/>
<leftPen lineWidth="1.0" lineColor="#FFFFFF"/>
<bottomPen lineWidth="1.0" lineColor="#B1B6BB"/>
<rightPen lineWidth="1.0" lineColor="#B1B6BB"/>
</box>
</style>
<style name="TableGroupHeaderFrameStyle" style="TableBaseFrameStyle" mode="Opaque" backcolor="#E3E9EF">
<box>
<topPen lineWidth="1.0" lineColor="#B1B6BB"/>
</box>
</style>
<style name="TableGroupHeaderTextStyle" style="ReportDefault" mode="Opaque" forecolor="#666666" backcolor="#E3E9EF" hTextAlign="Left" hImageAlign="Left" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11" isBold="true">
<box leftPadding="5" rightPadding="5">
<topPen lineWidth="1.0" lineColor="#B1B6BB"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
</style>
<style name="TableGroupFooterFrameStyle" style="TableBaseFrameStyle" mode="Opaque" backcolor="#E7ECF2">
<box>
<topPen lineWidth="1.0" lineColor="#E3E9EF"/>
<leftPen lineWidth="1.0" lineColor="#E3E9EF"/>
<bottomPen lineWidth="1.0" lineColor="#E3E9EF"/>
<rightPen lineWidth="1.0" lineColor="#E3E9EF"/>
</box>
</style>
<style name="TableGroupFooterTextStyle" style="ReportDefault" mode="Opaque" forecolor="#666666" backcolor="#E7ECF2" hTextAlign="Left" hImageAlign="Left" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11" isBold="true">
<box leftPadding="5" rightPadding="5">
<topPen lineWidth="1.0" lineColor="#E3E9EF"/>
<leftPen lineWidth="1.0" lineColor="#E3E9EF"/>
<bottomPen lineWidth="1.0" lineColor="#E3E9EF"/>
<rightPen lineWidth="1.0" lineColor="#E3E9EF"/>
</box>
</style>
<style name="TableSummaryFrameStyle" style="TableBaseFrameStyle">
<box>
<leftPen lineWidth="1.0" lineColor="#AAAAAA"/>
<rightPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableSummaryTextNoBorderStyle" style="ReportDefault" mode="Opaque" forecolor="#666666" fontName="DejaVu Sans" isBold="true">
<box leftPadding="5" rightPadding="5"/>
</style>
<style name="TableSummaryTextStyle" style="TableSummaryTextNoBorderStyle">
<box>
<pen lineWidth="1.0"/>
</box>
</style>
<style name="TableTitleFrameStyle" style="TableFrameStyle">
<box topPadding="0" bottomPadding="0">
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="0.0"/>
<rightPen lineWidth="0.0"/>
</box>
</style>
<style name="TableTitleTextStyle" style="ReportDefault" mode="Opaque" forecolor="#333333" backcolor="#FFFFFF" hTextAlign="Center" hImageAlign="Center" fontSize="18" isBold="false">
<box bottomPadding="8">
<pen lineColor="#000000"/>
<topPen lineWidth="0.0"/>
</box>
</style>
<style name="TableDetailFrameStyle" style="TableBaseFrameStyle">
<box>
<leftPen lineWidth="1.0" lineColor="#AAAAAA"/>
<rightPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="TableDetailTextStyle" style="ReportDefault" mode="Opaque" forecolor="#666666" backcolor="#FFFFFF" hTextAlign="Left" hImageAlign="Left" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11" isBold="false">
<box leftPadding="5" rightPadding="5">
<pen lineWidth="1.0" lineStyle="Solid"/>
<topPen lineWidth="1.0" lineColor="#E3E9EF"/>
<leftPen lineWidth="1.0" lineColor="#E3E9EF"/>
<bottomPen lineWidth="1.0" lineColor="#E3E9EF"/>
<rightPen lineWidth="1.0" lineColor="#E3E9EF"/>
</box>
</style>
<style name="ChartReportTitle" style="ReportDefault" mode="Opaque" forecolor="#333333" backcolor="#FFFFFF" hTextAlign="Center" hImageAlign="Center" fontSize="18" isBold="false">
<box>
<pen lineColor="#000000"/>
<topPen lineWidth="0.0" lineStyle="Solid"/>
</box>
</style>
<style name="ChartTitle" forecolor="#000000" fontName="DejaVu Sans" fontSize="12" isBold="true"/>
<style name="ChartSubtitle" forecolor="#000000" fontName="DejaVu Sans" fontSize="9" isBold="false"/>
<style name="ChartLegend" forecolor="#000000" backcolor="#FFFFFF" fontName="DejaVu Sans" fontSize="9" isBold="false"/>
<style name="ChartSeriesColor0" backcolor="#87C4FE"/>
<style name="ChartSeriesColor1" backcolor="#E96270"/>
<style name="ChartSeriesColor2" backcolor="#D1D1D1"/>
<style name="ChartSeriesColor3" backcolor="#FFEE99"/>
<style name="ChartSeriesColor4" backcolor="#6164FF"/>
<style name="ChartSeriesColor5" backcolor="#B0E992"/>
<style name="ChartSeriesColor6" backcolor="#AE9CEA"/>
<style name="ChartSeriesColor7" backcolor="#F5B05E"/>
<style name="ChartSeriesColor8" backcolor="#589EE1"/>
<style name="ChartSeriesColor9" backcolor="#AE4E59"/>
<style name="ChartSeriesColor10" backcolor="#747474"/>
<style name="ChartSeriesColor11" backcolor="#E2DC77"/>
<style name="ChartSeriesColor12" backcolor="#4749A5"/>
<style name="ChartSeriesColor13" backcolor="#81B963"/>
<style name="ChartSeriesColor14" backcolor="#7764B4"/>
<style name="ChartSeriesColor15" backcolor="#F27B4C"/>
<style name="ChartCategoryAxisLabelFormat" forecolor="#000000" fontName="DejaVu Sans" fontSize="11" isBold="true"/>
<style name="ChartCategoryAxisTickFormat" forecolor="#000000" fontName="DejaVu Sans" fontSize="9" isBold="false"/>
<style name="ChartValueAxisLabelFormat" forecolor="#000000" fontName="DejaVu Sans" fontSize="11" isBold="true"/>
<style name="ChartValueAxisTickFormat" forecolor="#000000" fontName="DejaVu Sans" fontSize="9" isBold="false"/>
<style name="ChartContext" backcolor="#D1CA67"/>
<style name="CrosstabElementStyle" mode="Transparent" forecolor="#000033" backcolor="#FFFFFF" hTextAlign="Center" hImageAlign="Center" vTextAlign="Middle" vImageAlign="Middle" fontName="DejaVu Sans" fontSize="11">
<box bottomPadding="1" rightPadding="1">
<topPen lineWidth="0.0"/>
<leftPen lineWidth="0.0"/>
<bottomPen lineWidth="1.0" lineColor="#AAAAAA"/>
<rightPen lineWidth="1.0" lineColor="#AAAAAA"/>
</box>
</style>
<style name="CrosstabBaseCellStyle" mode="Transparent">
<box padding="0">
<pen lineWidth="0.0"/>
</box>
</style>
<style name="CrosstabBaseTextStyle" mode="Opaque" forecolor="#666666" backcolor="#FFFFFF" hTextAlign="Left" hImageAlign="Left" vTextAlign="Top" vImageAlign="Top" fontName="DejaVu Sans" fontSize="11" isBold="true">
<box topPadding="3" leftPadding="5" bottomPadding="3" rightPadding="5">
<topPen lineWidth="1.0" lineColor="#FFFFFF"/>
<leftPen lineWidth="1.0" lineColor="#FFFFFF"/>
<bottomPen lineWidth="1.0" lineColor="#B1B6BB"/>
<rightPen lineWidth="1.0" lineColor="#B1B6BB"/>
</box>
</style>
<style name="CrosstabTitleTextStyle" style="CrosstabBaseTextStyle" forecolor="#333333" fontSize="18" isBold="false">
<box>
<pen lineWidth="0.0" lineColor="#000000"/>
</box>
</style>
<style name="CrosstabHeaderTextStyle" style="CrosstabBaseTextStyle" backcolor="#D5DEE8"/>
<style name="CrosstabHeaderLabelStyle" style="CrosstabHeaderTextStyle" mode="Transparent">
<box>
<pen lineWidth="0.0"/>
</box>
</style>
<style name="CrosstabMeasureHeaderTextStyle" style="CrosstabBaseTextStyle" backcolor="#D3C8EB"/>
<style name="CrosstabMeasureHeaderLabelStyle" style="CrosstabMeasureHeaderTextStyle" mode="Transparent">
<box>
<pen lineWidth="0.0"/>
</box>
</style>
<style name="CrosstabColumnMeasureHeaderTextStyle" style="CrosstabMeasureHeaderTextStyle"/>
<style name="CrosstabRowMeasureHeaderTextStyle" style="CrosstabMeasureHeaderTextStyle" isBold="false"/>
<style name="CrosstabDimensionHeaderTextStyle" style="CrosstabBaseTextStyle" backcolor="#E7ECF2" isBold="false"/>
<style name="CrosstabDetailTextStyle" style="CrosstabBaseTextStyle" backcolor="#FFFFFF" hTextAlign="Right" hImageAlign="Right" isBold="false">
<box>
<topPen lineWidth="1.0" lineColor="#E3E9EF"/>
<leftPen lineWidth="1.0" lineColor="#E3E9EF"/>
<bottomPen lineWidth="1.0" lineColor="#E3E9EF"/>
<rightPen lineWidth="1.0" lineColor="#E3E9EF"/>
</box>
<conditionalStyle>
<conditionExpression><![CDATA[$V{CROSSTAB_TOTAL_DISCRIMINATOR}]]></conditionExpression>
<style backcolor="#F0F4F8" hTextAlign="Right" hImageAlign="Right" isBold="true">
<box>
<topPen lineWidth="1.0" lineColor="#E3E9EF"/>
<leftPen lineWidth="1.0" lineColor="#E3E9EF"/>
<bottomPen lineWidth="1.0" lineColor="#E3E9EF"/>
<rightPen lineWidth="1.0" lineColor="#E3E9EF"/>
</box>
</style>
</conditionalStyle>
</style>
<style name="CrosstabDummyHeaderTextStyle" style="CrosstabBaseTextStyle" backcolor="#D4D4D4"/>
<parameter name="REPORT_TITLE" class="java.lang.String" isForPrompting="false">
<property name="net.sf.jasperreports.data.cache.included" value="true"/>
<defaultValueExpression><![CDATA[null]]></defaultValueExpression>
</parameter>
<parameter name="_JRS_ADHOC_CHART_STATE" class="java.lang.String" isForPrompting="false">
<property name="net.sf.jasperreports.data.cache.included" value="true"/>
</parameter>
<parameter name="_JRS_ADHOC_QUERY_DATA" class="java.lang.String" isForPrompting="false">
<property name="net.sf.jasperreports.data.cache.included" value="true"/>
</parameter>
<field name="c_gender" class="java.lang.String">
<fieldDescription><![CDATA[c_gender]]></fieldDescription>
</field>
<field name="store_sales" class="java.lang.Double">
<fieldDescription><![CDATA[store_sales]]></fieldDescription>
</field>
<field name="product_family" class="java.lang.String">
<fieldDescription><![CDATA[product_family]]></fieldDescription>
</field>
<field name="c_country" class="java.lang.String">
<fieldDescription><![CDATA[c_country]]></fieldDescription>
</field>
<field name="Sum_store_sales" class="java.lang.Double"/>
<field name="quarter" class="java.lang.String">
<fieldDescription><![CDATA[quarter]]></fieldDescription>
</field>
<title>
<band height="335" splitType="Stretch">
<textField isStretchWithOverflow="true">
<reportElement key="staticText" style="ChartReportTitle" x="0" y="0" width="572" height="0" uuid="487722f7-0dd2-4fb0-86f6-e937ad83ff06">
<printWhenExpression><![CDATA[$P{REPORT_TITLE} != null && $P{REPORT_TITLE}.length() > 0]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Center"/>
<textFieldExpression><![CDATA[$P{REPORT_TITLE}]]></textFieldExpression>
</textField>
<componentElement>
<reportElement key="chart" positionType="Float" mode="Opaque" x="5" y="5" width="572" height="330" uuid="8bc741d5-26ae-4474-a53f-d5ab6beb9a31"/>
<jrhc:chart xmlns:jrhc="http://jaspersoft.com/highcharts" xsi:schemaLocation="http://jaspersoft.com/highcharts http://jaspersoft.com/schema/highcharts.xsd" type="StackedPercentBar" preferredHeight="353">
<jrhc:chartSetting name="_jrs_adhoc">
<jrhc:chartProperty name="_JRS_ADHOC_CHART_STATE">
<jrhc:propertyExpression><![CDATA[$P{_JRS_ADHOC_CHART_STATE}]]></jrhc:propertyExpression>
</jrhc:chartProperty>
<jrhc:chartProperty name="_JRS_ADHOC_QUERY_DATA">
<jrhc:propertyExpression><![CDATA[$P{_JRS_ADHOC_QUERY_DATA}]]></jrhc:propertyExpression>
</jrhc:chartProperty>
</jrhc:chartSetting>
</jrhc:chart>
</componentElement>
</band>
</title>
<summary>
<band height="138" splitType="Stretch">
<textField hyperlinkType="Reference" hyperlinkTarget="Blank">
<reportElement mode="Opaque" x="220" y="15" width="119" height="30" forecolor="#FFFFFF" backcolor="#7FFF00" uuid="65c04b7a-29e2-45b2-ad37-ff22d0c14032">
<property name="net.sf.jasperreports.export.html.class" value="btn"/>
<property name="net.sf.jasperreports.export.html.id" value="idBtn"/>
<property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font size="24"/>
</textElement>
<textFieldExpression><![CDATA["View"]]></textFieldExpression>
<anchorNameExpression><![CDATA["myButton"]]></anchorNameExpression>
<hyperlinkReferenceExpression><![CDATA["http://google.ru"]]></hyperlinkReferenceExpression>
<hyperlinkTooltipExpression><![CDATA["Click to view"]]></hyperlinkTooltipExpression>
</textField>
</band>
</summary>
</jasperReport>
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>