Chart tips and tricks project - importing into workspace and using the samples

Attached to the article is the zip containing JRXML's of various charts that demonstrate useful tips and tricks you can do with HTML5 (Higcharts).

To import the chart project do the following:

  • Download the zip file
  • Open your JasperSoft Studio and go to Project Explorer
  • Right click anywhere on the whitespace and press Import
  • Go to General folder and select Existing projects into workspace
  • Press "Select Archive File" and point the wizard to the downloaded archive
  • Check the Chart Samples project if it is unchecked and press Finish

To run the samples you'll need to have JSS Sample DB / SugarCRM DB and Foodmart DB. JSS Sample DB can be defined as a data adapter:

  • Driver: org.hsqldb.jdbcDriver
  • URL: jdbc:hsqldb:res:/defaults/hsqldb/test
  • username: sa
  • password: do not provide any password

The SugarCRM and Foodmart DB can be obtained from the JasperReports Server distribution and can be installed separately using buildomatic tool. You will need to make sure that you have a database server running (MySQL, PostgreSQL, etc.) where you can install the sample databases. To do that

  • Download the JasperReports Server distribution and unpack it
  • Go to /buildomatic/sample_conf folder.
  • Select the sample configuration file for desired database and edit it. The only properties that you need to edit are database related: dbhost, dbusername, dbpassword, dbport, etc. You will need to specify the user that can create databases.
  • Save the file as and copy it to /buildomatic/
  • Go to /buildomatic/ execute the following commands in the folder:
    • js-ant create-sugarcrm-db
    • js-ant create-foodmart-db
    • js-ant load-sugarcrm-db
    • js-ant load-foodmart-db
    • js-ant update-foodmart-db

Once the sample databases are installed, you can create the data adapters for the samples in your studio and run the reports.