Skip to content

Commit 99d4780

Browse files
committed
Add jasperreports-functions to base libs, add test
1 parent 595dfed commit 99d4780

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

libs.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ https://repo1.maven.org/maven2/commons-beanutils/commons-beanutils/1.10.0/common
22
https://repo1.maven.org/maven2/org/apache/commons/commons-collections4/4.5.0-M3/commons-collections4-4.5.0-M3.jar
33
https://repo1.maven.org/maven2/commons-digester/commons-digester/2.1/commons-digester-2.1.jar
44
https://repo1.maven.org/maven2/commons-logging/commons-logging/1.3.4/commons-logging-1.3.4.jar
5-
https://repo1.maven.org/maven2/net/sf/jasperreports/jasperreports/6.21.4/jasperreports-6.21.4.jar
5+
https://repo1.maven.org/maven2/net/sf/jasperreports/jasperreports/6.21.5/jasperreports-6.21.5.jar
66
https://jaspersoft.jfrog.io/artifactory/third-party-ce-artifacts/com/github/librepdf/openpdf/1.3.30.jaspersoft.3/openpdf-1.3.30.jaspersoft.3.jar
77
https://repo1.maven.org/maven2/org/postgresql/postgresql/42.7.5/postgresql-42.7.5.jar
8+
https://repo1.maven.org/maven2/net/sf/jasperreports/jasperreports-functions/6.21.5/jasperreports-functions-6.21.5.jar
9+
https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/3.42.0/ecj-3.42.0.jar

tests/Country.jrxml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -507,18 +507,19 @@ WHERE
507507
</band>
508508
</title>
509509
<pageHeader>
510-
<band height="34" splitType="Stretch">
511-
<textField>
512-
<reportElement x="15" y="4" width="245" height="30" uuid="5a7b3894-65e1-468f-8555-4f0271105e7d"/>
513-
<textFieldExpression><![CDATA["Country name: " + $F{name}]]></textFieldExpression>
514-
</textField>
515-
</band>
510+
<band height="34" splitType="Stretch"/>
516511
</pageHeader>
517512
<columnHeader>
518513
<band height="61" splitType="Stretch"/>
519514
</columnHeader>
520515
<detail>
521-
<band height="125" splitType="Stretch"/>
516+
<band height="125" splitType="Stretch">
517+
<textField>
518+
<reportElement x="0" y="15" width="550" height="95" uuid="5a7b3894-65e1-468f-8555-4f0271105e7d"/>
519+
<textFieldExpression><![CDATA["Country name: " + $F{name} + "\n" +
520+
"Population: " + IF($F{pop_est}>1000000000,"More than one billion", "Less than one billion")]]></textFieldExpression>
521+
</textField>
522+
</band>
522523
</detail>
523524
<columnFooter>
524525
<band height="45" splitType="Stretch"/>

tests/api_tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ def test_country_report_html(self):
101101
self.assertEqual(200, response.status_code, "Status code is not OK")
102102
self.assertTrue(success, "Response is not a valid HTML")
103103
self.assertTrue("Country name: Peru" in html, "Cannot find 'Country name: Peru' in generated HTML")
104+
self.assertTrue("Population: Less than one billion" in html, "Cannot find 'Population: Less than one billion' in generated HTML")
105+
104106

105107
def test_country_aggregated_report_html(self):
106108
params = {

0 commit comments

Comments
 (0)