Create and Load Sample Data¶
The procedure for Building JasperReports Server Source Code loads core data required to start the application, but it doesn't create sample data, such as sample reports to run and sample databases. Follow the steps below to create and load sample data.
Load Sample Data¶
The buildomatic scripts can load sample resources and sample databases. Note: In the procedure below, your jasperserver database will be deleted and re-created unless you choose ‘n’ for No when prompted.
Your default_master.properties should already be created.
-
Start your database server.
-
Stop your application server.
-
Run the commands shown below:
Commands
Description
cd <js-src>/jasperserver/buildomaticjs-ant create-load-all-dbs-proCreates and loads the
jasperserverdatabaseImports core bootstrap resources
Creates and loads sample databases
Imports sample resources
(Choose ‘n’ when prompted if you do not want to recreate your
jasperserverdatabase.)
Generate Your Own Sample Resources¶
This procedure generates the same resources imported and used by the released version of JasperReports Server. Your jasperserver database will be deleted and re-created.
Your default_master.properties should have already been created.
Generating Sample Resources for MySQL, PostgreSQL, Oracle, and SQL Server Databases¶
-
Make sure that the sample data has been loaded.
-
Start your database server.
-
Stop your application server.
-
Run the commands shown below:
Commands Description cd <js-src>/jasperserver/buildomaticjs-ant re-init-js-db-``pro``Drop, create, and initialize the jasperserverdatabase.js-ant run-production-data-``pro``Generate sample resources using the processing logic from the production-test source code.
Generating Sample Resources for the DB2 Database¶
The buildomatic scripts cannot automatically connect to a remote DB2 database and carry out admin operations, so you have to perform additional steps to create the databases.
The DB2 client software, db2 or db2cmd, can be used to interact with DB2.
-
Start your database server.
-
Stop your application server.
-
If the database already exists, remove it before creating a new one.
-
Run the commands shown below:
Commands Description db2 create database jsprsrvr using codeset utf-8 territory us pagesize 16384Create and initialize the jasperserverdatabase.db2 create database sugarcrmOptionally, create the sugarcrmdatabase.db2 create database foodmartOptionally, create the foodmartdatabase.