-
Notifications
You must be signed in to change notification settings - Fork 416
Update JasperReports to version 7 #3632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 36 commits
41d72b6
f3039ee
ba3ea8a
49eaca0
3496cec
685ad20
34289e2
cac4cd8
70d8f2a
8b279a1
e606fe9
012afa5
58e8258
09d315b
730ac3d
e73704e
0af6fe0
0ff7145
0280c74
8bc7eb2
1fcaa18
af0569d
ed604b9
6683cc2
51fadf7
3473e43
416f5a6
e45b5dd
51803ef
5ac3379
6646de5
28c98fc
b139f1c
c95e9e9
fbb015f
e9beb19
32080b0
8df08ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,12 +162,15 @@ dependencies { | |
| 'org.geotools:gt-cql:33.1', | ||
| ) | ||
| 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', | ||
|
|
@@ -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', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why get them out of the jasper section?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It worked, but it would be better if it contains only jasper libraries
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally, I like to have all the dependency related to jasper in the same section @sebr72 what do you think? |
||
| ) | ||
|
|
||
| implementation( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -321,6 +321,9 @@ 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().getNodeName().equals("jasperReport")) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid unnecessary NPE, Please revert the .equals parameters |
||
| continue; | ||
| } | ||
| if (!values.containsKey(name)) { | ||
| if (param.getElementsByTagName("defaultValueExpression").getLength() == 0) { | ||
| missing.append("\t* ").append(name).append("\n"); | ||
|
|
||
| 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"/> | ||
|
|
@@ -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"/> | ||
|
|
@@ -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"/> | ||
|
|
@@ -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"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why opaque mode added ? |
||
| <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"/> | ||
|
|
@@ -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> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check and confirm all these jasper reports libs are opensource. Write in the description a brief explanation of the licensing changes between 6.21.x and 7.0.x (do not hesitate to add links to jasper report documentation)