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>5.1.0</version>
</dependency>
<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-adhoc</artifactId>
  <version>5.1.0</version>
</dependency>   
<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-googlecharts</artifactId>
  <version>5.1.0</version>
</dependency> 

In some situations, maven may have a problem with downloading the itext-2.1.7.js6 dependency to your local maven repository. The problem may happen because the library itext-2.1.7.js6 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>5.1.1-SNAPSHOT</version>
</dependency>
<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-adhoc</artifactId>
  <version>5.1.1-SNAPSHOT</version>
</dependency>
<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-googlecharts</artifactId>
  <version>5.1.1-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

  • Thu
    Jan
    25
    Changes in version 5.1.0 upgrade to JasperReports 6.5.1 removed xhtml and excelapi exporter removed thread safety...
  • Fri
    Jan
    27
    Changes in version 5.0.0 upgrade to JasperReports 6.4.0 upgrade to Java 1.7, DynamicReports is no longer compatibl...
  • Thu
    Jul
    28
    Changes in version 4.1.1 upgrade to JasperReports 6.2.2 added new types of component stretch type minor bug fixes...