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

In some situations, maven may have a problem with downloading the itext- dependency to your local maven repository. The problem may happen because the library itext- 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.1-SNAPSHOT</version>
</dependency>
<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-adhoc</artifactId>
  <version>4.0.1-SNAPSHOT</version>
</dependency>
<dependency>
  <groupId>net.sourceforge.dynamicreports</groupId>
  <artifactId>dynamicreports-googlecharts</artifactId>
  <version>4.0.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
    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 ...
  • Wed
    May
    07
    Changes in version 3.2.1 getSubreportWidth() method was added to ReportParameters class, the method returns the ava...
  • Wed
    Feb
    26
    Changes in version 3.2.0 upgrade to JasperReports 5.5.1 setPrintWhenExpression method was added to all report band...