Connect to JasperReports Server


JasperReports Server is a stand-alone and embeddable reporting server. In this tutorial we will see how connect JaspersoftStudio to JasperReports Server and how to upload and download a report from the server. Since we need to interact with JasperReports Server we need an URL to it and we need the credential to access it. Anyway if you doesn't have one of this you can do a local installation of JasperReports Server. To do this, follow THIS link and download the correct version for your operative system, and then install it following the on screen instructions.

To have an easy replicable example lets suppose that we are using a local installation of JasperReports Server. To check if our server is running open your browser and copy in the address bar this URL:

http://localhost:8080/jasperserver/login.html

You should see a window like this:

Figure 1. JasperReports Server login screen

JasperReports Server login screen

If it is all working, start Jaspersoft Studio, go into the "Repository Explorer" tab and hit the button "Create a JasperReports Server Connection":

Figure 2. Create a connection to JasperReports server

Create a connection to JasperReports server

A dialog to insert the data of the server will appear, fill it as follow:

  • Name: the name of the connection, you can use any name you want. For this example we will leave the default one: JasperReports Server;
  • URL: the address of the server, the default one is already right if we are using a local server. For this example the correct address is http://localhost:8080/jasperserver/services/repository;
  • User: the username to access the server, the default one for the local server is "jasperadmin";
  • Password: as the username, for the local server by default it is "jasperadmin"

Then hit the test button to test the connection and it is all working hit the "Finish" button.

Figure 3. Configure the connection

Configure the connection

At this point you are connected to the server and you can upload and download reports.