compile
 
 
 
 
  XML Report Design Compilation

First, I was trying to convince people that report compilation is a design-time job and should not be performed at runtime.
You have to compile your XML report templates only once, just like you compile the Java source files of your application.

But then I started to receive many questions on the discussion forums about problems encountered when compiling report templates in Web environment. I decided it is the time to show everybody how to do it.

Remember however, that if your report templates are not dynamic, there is no point on recompiling them at runtime. Report definitions are static and only the data supplied to them is different with every report filling operation.

Now let's go for it!

The following example performs the compilation of the WebappReport.xml file and produces the WebappReport.jasper file.

JSP Example execute source
Servlet Example execute source


In some particular environments, invoking a Java compiler is not possible.
The library comes also with a special report compiler that uses the BeanShell library.

The report templates produced by this report compiler use the BeanShell library for expression evaluation during the report filling process.

BeanShell JSP Example execute source
BeanShell Servlet Example execute source


 



Copyright © 2001-2004 Teodor Danciu teodord@users.sourceforge.net