How to run the demo in JasperReports

Source: Internet
Author: User

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]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.