Configuration

Default settings

DynamicReports automatically looks for a file named dynamicreports-defaults.xml on startup.
In this file you can change the default settings (default font, pattern and horizontal alignment for all data types).

  <?xml version="1.0" encoding="UTF-8"?>
  <DynamicReports>
    <!-- DEFAULT FONT -->
    <font fontName="SansSerif" fontSize="10" pdfFontName="Helvetica" pdfEncoding="Cp1252" pdfEmbedded="false"/>
        
    <!-- DEFAULT DATA TYPES -->
    <bigDecimalType pattern="#,##0.00#" horizontalAlignment="RIGHT"/>
    <dateType pattern="MM/dd/yyyy" horizontalAlignment="RIGHT"/>
    ...  
  </DynamicReports>
 
Copy this file in the root of the classpath.

Maven configuration

DynamicReports is synchronized with Maven Central Repository.
Add the dependencies listed below to your pom.xml configuration file.

<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-core</artifactId>
  <version>4.0.2</version>
</dependency>
<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-adhoc</artifactId>
  <version>4.0.2</version>
</dependency>   
<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-googlecharts</artifactId>
  <version>4.0.2</version>
</dependency> 

In some situations, maven may have a problem with downloading the itext-2.1.7.js3 dependency to your local maven repository. The problem may happen because the library itext-2.1.7.js3 is not available in maven central repository, it is only available through JasperReports maven repository. If you are behind a firewall check if the firewall is not blocking that repository link or download the dependency and add it to your repository manually.

Maven snapshot repository configuration

To use the development snapshots of DynamicReports, change your pom.xml configuration:
just update the dynamicreports-core version

<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-core</artifactId>
  <version>4.0.3-SNAPSHOT</version>
</dependency>
<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-adhoc</artifactId>
  <version>4.0.3-SNAPSHOT</version>
</dependency>
<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-googlecharts</artifactId>
  <version>4.0.3-SNAPSHOT</version>
</dependency>
 

and add the Sonatype Nexus snapshot repository

<repositories>
  <repository>
    <id>sonatype-nexus-snapshots</id>
    <name>Sonatype Nexus Snapshots</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    <releases>
      <enabled>false</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>
 

Latest News

  • Wed
    Nov
    18
    Changes in version 4.0.2 upgrade to JasperReports 6.1.1 added support for QR Code barcode, see BarcodeReport for a...
  • Mon
    Aug
    03
    Changes in version 4.0.1 upgrade to JasperReports 6.1.0 downgrade to iText 2.1.7 in pdf exporter horizontal/verti...
  • Thu
    Jan
    22
    Changes in version 4.0.0 upgrade to JasperReports 6.0.0 upgrade to iText 5.5.0 and POI 3.10.1 in exporters xhtml ...