Related introduction
JasperReports is an open source Java report making engine
Http://jasperreports.sourceforge.net
ireport is a GUI tool for JasperReports to generate JasperReports jrxml files.
Http://ireport.sourceforge.net
Installation of Jasperreport
Unzip the downloaded zip file directly, then copy Dist/jasperreports-2.0.4.jar into%java_home%/lib/
Note that Jasperreports-2.0.4.jar is to be added to the classpath. If Classpath writes like this, you don't have to change%java_home%/lib.
Straight this, configuration complete, is not very simple ^_^
Installation of ireport
Direct decompression can be used, note, if you want to display Chinese, this is to download a itextasia.jar into the ireport Lib directory.
Run ireport directly click IReport.exe
Configuration of the running environment
1:JDK installation and environment variable configuration (new Java_home, add the relevant path in Path,classpath, specific slightly ...)
2:ant configuration (because JasperReports is compiled in ant by default)
Step 1: Download ant
Step 2: Add Ant_home=c:/ant (ANT's installation directory)
Step 3: Add%ant_home%/bin to Path
Step 4: Test ant to join the success in CMD knock ant if Show build.xml ... Indicates success
3: Using ant to compile demo example
In step 1:cmd, type ant
In step 2:cmd, type ant compile
In step 3:cmd, type Ant or Ant in the/demo/hsqldb directory Runserver
In step 4:cmd, type ant fill (fill the data, build the. jrprint file)
Step 5:cmd, type ant view
Here, the effect comes out, about the use of ant I also know why it is so, ignore him first, the key here is how to run
JasperReports in the demo, as for the use of ant is not the focus here, want to understand a friend can google some information
Study.
Well, this article is over. Back to explore some of the other features of JasperReports.
[This example is an example of jasperreports-2.0.4 with the following steps to show the correct results]