Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,15 @@ dependencies {
'org.geotools:gt-cql:33.2',
)
jasper(
'net.sf.jasperreports:jasperreports:6.21.4',
'net.sf.jasperreports:jasperreports-fonts:6.21.4',
'net.sf.jasperreports:jasperreports-functions:6.21.4',
'org.codehaus.groovy:groovy-all:3.0.23',
'ar.com.fdvs:DynamicJasper:5.3.9',
'joda-time:joda-time:2.13.1',
'com.itextpdf:itextpdf:5.5.13.4',
'net.sf.jasperreports:jasperreports:7.0.2',
'net.sf.jasperreports:jasperreports-excel-poi:7.0.2',
'net.sf.jasperreports:jasperreports-fonts:7.0.2',
'net.sf.jasperreports:jasperreports-functions:7.0.2',
'net.sf.jasperreports:jasperreports-json:7.0.2',
'net.sf.jasperreports:jasperreports-jdt:7.0.2',
'net.sf.jasperreports:jasperreports-pdf:7.0.2',
)
implementation(
'org.slf4j:slf4j-api:2.0.16',
Expand All @@ -185,6 +188,11 @@ dependencies {
'net.logstash.logback:logstash-logback-encoder:8.0',
// For PDF/A
'com.adobe.xmp:xmpcore:6.1.11',
// For JasperReports
'joda-time:joda-time:2.14.0',
'org.jfree:jcommon:1.0.24',
'org.apache.groovy:groovy-all:4.0.26',
'xalan:serializer:2.7.3',
)

implementation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.List;
import javax.annotation.Nonnull;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.data.JsonDataSource;
import net.sf.jasperreports.json.data.JsonDataSource;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ private void checkRequiredValues(
for (int i = 0; i < parameters.getLength(); i++) {
final Element param = (Element) parameters.item(i);
final String name = param.getAttribute("name");
if (param.getParentNode() != null
&& !"jasperReport".equals(param.getParentNode().getNodeName())) {
continue;
}
if (!values.containsKey(name)) {
if (param.getElementsByTagName("defaultValueExpression").getLength() == 0) {
missing.append("\t* ").append(name).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import java.util.WeakHashMap;
import net.sf.jasperreports.engine.JasperReportsContext;
import net.sf.jasperreports.engine.export.JRPdfExporter;
import net.sf.jasperreports.engine.util.ExifOrientationEnum;
import net.sf.jasperreports.engine.util.Pair;
import net.sf.jasperreports.export.pdf.PdfImage;
import net.sf.jasperreports.pdf.JRPdfExporter;
import net.sf.jasperreports.pdf.common.PdfImage;

public class JRPdfExporterWeakHashMap extends JRPdfExporter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import java.io.OutputStream;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.export.JRXlsExporter;
import net.sf.jasperreports.export.SimpleExporterInput;
import net.sf.jasperreports.export.SimpleOutputStreamExporterOutput;
import net.sf.jasperreports.poi.export.JRXlsExporter;

/** An PDF output format that uses Jasper reports to generate the result. */
public final class JasperReportExcelOutputFormat extends AbstractJasperReportOutputFormat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.PrintPageFormat;
import net.sf.jasperreports.engine.export.JRPdfExporter;
import net.sf.jasperreports.export.SimpleExporterInput;
import net.sf.jasperreports.export.SimpleOutputStreamExporterOutput;
import net.sf.jasperreports.export.SimplePdfExporterConfiguration;
import net.sf.jasperreports.export.type.PdfVersionEnum;
import net.sf.jasperreports.pdf.JRPdfExporter;
import net.sf.jasperreports.pdf.SimplePdfExporterConfiguration;
import net.sf.jasperreports.pdf.type.PdfVersionEnum;
import org.mapfish.print.config.PDFConfig;
import org.mapfish.print.processor.ExecutionStats;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version last-->
<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="DJR_2141" pageWidth="555" pageHeight="842" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" scriptletClass="ar.com.fdvs.dj.core.DJDefaultScriptlet" whenResourceMissingType="Key" uuid="e034c6ef-7449-4a6a-9b5e-4ce04cc083b2">
<jasperReport name="DJR_2141" language="java" pageWidth="555" pageHeight="842" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" scriptletClass="ar.com.fdvs.dj.core.DJDefaultScriptlet" whenResourceMissingType="Key" uuid="e034c6ef-7449-4a6a-9b5e-4ce04cc083b2">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<property name="com.jaspersoft.studio.unit." value="pixel"/>
<style name="header_style_1" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hAlign="Center" vAlign="Middle" rotation="None" isBlankWhenNull="true" fontName="DejaVu Sans" fontSize="7" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded="false">
<style name="header_style_1" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hTextAlign="Center" vTextAlign="Middle" hImageAlign="Center" vImageAlign="Middle" rotation="None" blankWhenNull="true" fontName="DejaVu Sans" fontSize="7.0" bold="true" italic="false" underline="false" pdfEmbedded="false">
<box padding="8">
<pen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
Expand All @@ -12,7 +10,7 @@
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
</style>
<style name="header_style_2" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hAlign="Center" vAlign="Middle" rotation="None" isBlankWhenNull="true" fontName="DejaVu Sans" fontSize="7" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded="false">
<style name="header_style_2" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hTextAlign="Center" vTextAlign="Middle" hImageAlign="Center" vImageAlign="Middle" rotation="None" blankWhenNull="true" fontName="DejaVu Sans" fontSize="7.0" bold="true" italic="false" underline="false" pdfEmbedded="false">
<box padding="8">
<pen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
Expand All @@ -21,7 +19,7 @@
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
</style>
<style name="header_style_3" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hAlign="Center" vAlign="Middle" rotation="None" isBlankWhenNull="true" fontName="DejaVu Sans" fontSize="7" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded="false">
<style name="header_style_3" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hTextAlign="Center" vTextAlign="Middle" hImageAlign="Center" vImageAlign="Middle" rotation="None" blankWhenNull="true" fontName="DejaVu Sans" fontSize="7.0" bold="true" italic="false" underline="false" pdfEmbedded="false">
<box padding="8">
<pen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
Expand All @@ -30,37 +28,34 @@
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
</style>
<style name="column_style_1" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hAlign="Left" vAlign="Middle" rotation="None" isBlankWhenNull="true" fontName="DejaVu Sans" fontSize="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded="false">
<style name="column_style_1" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hTextAlign="Left" vTextAlign="Middle" hImageAlign="Left" vImageAlign="Middle" rotation="None" blankWhenNull="true" fontName="DejaVu Sans" fontSize="8.0" bold="false" italic="false" underline="false" pdfEmbedded="false">
<box padding="8">
<pen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#BABABA"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionalStyle mode="Opaque" backcolor="#F2F2F2">
<conditionExpression><![CDATA[new java.lang.Boolean(((Number)$V{REPORT_COUNT}).doubleValue() % 2 == 0)]]></conditionExpression>
<style mode="Opaque" backcolor="#F2F2F2"/>
</conditionalStyle>
</style>
<style name="column_style_2" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hAlign="Left" vAlign="Middle" rotation="None" isBlankWhenNull="true" fontName="DejaVu Sans" fontSize="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded="false">
<style name="column_style_2" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hTextAlign="Left" vTextAlign="Middle" hImageAlign="Left" vImageAlign="Middle" rotation="None" blankWhenNull="true" fontName="DejaVu Sans" fontSize="8.0" bold="false" italic="false" underline="false" pdfEmbedded="false">
<box padding="8">
<pen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#BABABA"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionalStyle mode="Opaque" backcolor="#F2F2F2">
<conditionExpression><![CDATA[new java.lang.Boolean(((Number)$V{REPORT_COUNT}).doubleValue() % 2 == 0)]]></conditionExpression>
<style mode="Opaque" backcolor="#F2F2F2"/>
</conditionalStyle>
</style>
<style name="column_style_3" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hAlign="Left" vAlign="Middle" rotation="None" isBlankWhenNull="true" fontName="DejaVu Sans" fontSize="8" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded="false">
<style name="column_style_3" mode="Transparent" forecolor="#000000" backcolor="#FFFFFF" radius="0" hTextAlign="Left" vTextAlign="Middle" hImageAlign="Left" vImageAlign="Middle" rotation="None" blankWhenNull="true" fontName="DejaVu Sans" fontSize="8.0" bold="false" italic="false" underline="false" pdfEmbedded="false">
<box padding="8">
<topPen lineWidth="1.0" lineStyle="Solid" lineColor="#BABABA"/>
<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
<conditionalStyle>
<conditionalStyle mode="Opaque" backcolor="#F2F2F2">
<conditionExpression><![CDATA[new java.lang.Boolean(((Number)$V{REPORT_COUNT}).doubleValue() % 2 == 0)]]></conditionExpression>
<style mode="Opaque" backcolor="#F2F2F2"/>
</conditionalStyle>
</style>
<parameter name="SUBREPORT_DIR" class="java.lang.String"/>
Expand All @@ -73,66 +68,43 @@
<parameter name="attribute_rotation" class="java.lang.String"/>
<parameter name="map_main" class="java.awt.image.BufferedImage"/>
<parameter name="attribute_units" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
<query language="sql"><![CDATA[]]></query>
<field name="col1" class="java.lang.String"/>
<field name="col2" class="java.lang.String"/>
<field name="col3" class="java.lang.String"/>
<pageHeader>
<band/>
</pageHeader>
<columnHeader>
<band height="20">
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/>
<property name="local_mesure_unitheight" value="pixel"/>
<pageHeader/>
<columnHeader height="20">
<element kind="textField" uuid="3a4e9d49-3645-4ca7-8e36-abfb35c0f688" key="header_id" positionType="Float" stretchType="ElementGroupHeight" x="0" y="0" width="185" height="20" textAdjust="StretchHeight" blankWhenNull="true" printWhenDetailOverflows="true" style="header_style_1">
<expression><![CDATA["col1"]]></expression>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField textAdjust="StretchHeight" isBlankWhenNull="true">
<reportElement key="header_id" style="header_style_1" positionType="Float" stretchType="RelativeToTallestObject" x="0" y="0" width="185" height="20" isPrintWhenDetailOverflows="true" uuid="3a4e9d49-3645-4ca7-8e36-abfb35c0f688">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA["col1"]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight" isBlankWhenNull="true">
<reportElement key="header_name" style="header_style_2" positionType="Float" stretchType="RelativeToTallestObject" x="185" y="0" width="185" height="20" isPrintWhenDetailOverflows="true" uuid="9fac5b94-c27f-4ed4-960c-ac48b60d0598">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textFieldExpression><![CDATA["col2"]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight" isBlankWhenNull="true">
<reportElement key="header_icon" style="header_style_3" positionType="Float" stretchType="RelativeToTallestObject" x="370" y="0" width="185" height="20" isPrintWhenDetailOverflows="true" uuid="91317b7c-b366-4720-8e25-689630c8db0f">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement>
<font fontName="DejaVu Sans" size="8"/>
</textElement>
<textFieldExpression><![CDATA["col3"]]></textFieldExpression>
</textField>
</band>
</element>
<element kind="textField" uuid="9fac5b94-c27f-4ed4-960c-ac48b60d0598" key="header_name" positionType="Float" stretchType="ElementGroupHeight" x="185" y="0" width="185" height="20" textAdjust="StretchHeight" blankWhenNull="true" printWhenDetailOverflows="true" style="header_style_2">
<expression><![CDATA["col2"]]></expression>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</element>
<element kind="textField" uuid="91317b7c-b366-4720-8e25-689630c8db0f" key="header_icon" positionType="Float" stretchType="ElementGroupHeight" x="370" y="0" width="185" height="20" fontName="DejaVu Sans" fontSize="8.0" textAdjust="StretchHeight" blankWhenNull="true" printWhenDetailOverflows="true" style="header_style_3">
<expression><![CDATA["col3"]]></expression>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</element>
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/>
<property name="local_mesure_unitheight" value="pixel"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</columnHeader>
<detail>
<band height="53">
<element kind="image" uuid="45c4a4a3-7262-4f70-86cc-bb0b35c5b758" key="column_1" x="0" y="0" width="185" height="53" style="column_style_1">
<expression><![CDATA[$F{col1}]]></expression>
</element>
<element kind="textField" uuid="1e0ee0ef-22a5-43d5-b8d2-a731fc573055" key="style2" positionType="Float" stretchType="ElementGroupHeight" x="185" y="0" width="185" height="53" textAdjust="StretchHeight" blankWhenNull="true" printWhenDetailOverflows="true" style="column_style_2">
<expression><![CDATA[$F{col2}]]></expression>
</element>
<element kind="textField" uuid="25f68c48-9238-4b5b-b3dd-884418c66f7d" key="style3" positionType="Float" stretchType="ElementGroupHeight" x="370" y="0" width="185" height="53" textAdjust="StretchHeight" blankWhenNull="true" printWhenDetailOverflows="true" style="column_style_3">
<expression><![CDATA[$F{col2}]]></expression>
<property name="local_mesure_unitheight" value="pixel"/>
</element>
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/>
<image>
<reportElement key="column_1" style="column_style_1" x="0" y="0" width="185" height="53" uuid="45c4a4a3-7262-4f70-86cc-bb0b35c5b758"/>
<imageExpression><![CDATA[$F{col1}]]></imageExpression>
</image>
<textField textAdjust="StretchHeight" isBlankWhenNull="true">
<reportElement key="style2" style="column_style_2" positionType="Float" stretchType="RelativeToTallestObject" x="185" y="0" width="185" height="53" isPrintWhenDetailOverflows="true" uuid="1e0ee0ef-22a5-43d5-b8d2-a731fc573055"/>
<textFieldExpression><![CDATA[$F{col2}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight" isBlankWhenNull="true">
<reportElement key="style3" style="column_style_3" positionType="Float" stretchType="RelativeToTallestObject" x="370" y="0" width="185" height="53" isPrintWhenDetailOverflows="true" uuid="25f68c48-9238-4b5b-b3dd-884418c66f7d">
<property name="local_mesure_unitheight" value="pixel"/>
</reportElement>
<textFieldExpression><![CDATA[$F{col2}]]></textFieldExpression>
</textField>
</band>
</detail>
<pageFooter>
<band/>
</pageFooter>
<summary>
<band/>
</summary>
<pageFooter/>
<summary/>
</jasperReport>
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import java.util.HashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.data.JsonDataSource;
import net.sf.jasperreports.engine.design.JRDesignField;
import net.sf.jasperreports.json.data.JsonDataSource;
import org.junit.Test;
import org.mapfish.print.AbstractMapfishSpringTest;
import org.mapfish.print.TestHttpClientFactory;
Expand Down
Loading
Loading