Next step after succesfully adding a new JDBC data source

2

I have succesfully added a JDBC datasource in the datasources folder

The data source specifies a mysql database I want to use for the purposes of data analysis, data presentaion and reporting.

My question is, is there something else I have to do in order to be able to view the data from the database.

I am new to JasperReports server and am not sure how to go about this. I have been reading the pdf guides:

i.e.: JasperReports-Server-Admin-Guide, JasperReports-Server-CP-User-Guide, JasperReports-Server-Install-Guide and JasperServer-CE-Source-Build-Guide but cannot find specific info on this.

from browsing the my buildomatic folder and more specifically:

the following files:

buildomatic/install_resources/sql/FoodMartCreateData.zip

buildomatic/install_resources/sql/mysql/foodmart-mysql.zip

buildomatic/install_resources/sql/mysql/foodmart-mysql.zip

Do I have to export my mysql database as a zip file and then import it into one of the folders above?

I see there is a js-import.sh and js-export.sh command in the buildomatic folder

Should I be using these commands to export and import my mysql database into the buildomatic/install_resources/sql

or buildomatic/install_resources/sql/mysql folder?

Or is this a case of adding something in the 'default_master.properties' file?

Is this simply a case where I should be using IReports to create reports based on my database, then import them to JasperReports Server? I'd rather not do that if possible.

toonskies's picture
Joined: Mar 22 2012 - 2:07am
Last seen: 7 years 1 month ago

4 Answers:

0
Your last statement is correct: use ireport to create a report's jrxml file, create a report resource in the JR server (it will prompt you to upload the jrxml file), and link the report to the datasource. That's the way it's done when using JR Server.

I don't know why you're reluctant to upload reports to the server, but the other option is to generate reports using the Jasper library embedded in a Java app. The JasperReports Library Guide describes that scenario.

The js-import/export scripts are for exporting the contents of a repository to a directory or zip file, and then importing those definitions into a different repository. They're useful for backups, promoting a development repo to a test or production repo, etc.
mwoinoskibt's picture
Joined: Feb 13 2012 - 8:14am
Last seen: 7 years 2 months ago
1

Thanks, yeah that makes perfect sense. I eventually came to that conclusion myself from reading the pdf manuals.

As it stands, I've created a report in iReport and add it as a JasperReport resource in a sub folder of the Reports main folder.

I imported the .jrxml file and it was added succesfully.

I have also added the JDBC data source in the main Data Sources folder that is associated with the report I imported.

However, when I click on the report, it opens a page for the report, but there is just text that says:

"The report is empty"

How exactly do I link the report to the datasource?

I presume this is what I have to do?

toonskies's picture
Joined: Mar 22 2012 - 2:07am
Last seen: 7 years 1 month ago
0
Drill down to the report in the report browser, select it, Edit, and click Data Source in the button cluster/menu on the left. Select your datasource from the repository.

It may be helpful to look at the logs in tomcat/logs or tomcat/webapps/jasperserver/WEB-INF/logs
mwoinoskibt's picture
Joined: Feb 13 2012 - 8:14am
Last seen: 7 years 2 months ago
1
sruthyms's picture
Joined: Mar 11 2014 - 5:38am
Last seen: 4 years 12 months ago
Feedback