Jump to content

Datasource configuration for a jasperreport in Jaspersoft studio


Li Gang

Recommended Posts

Suppose that I will use the code below to print a Jaserprreport from the Java side.

JasperPrint jasperPrint = JasperFillManager.fillReport(reporte, parametros, datasource);

How am I supposed to configure the datasource for the Jasperreport in Jaspersoft studio?

Thanks in advance.

P.S.: Although we can view the data source inforamation during the design phase, it seems that the data source has not been saved in the report xml file. In other words, I need to provide full database connection information on the Java application side.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You will have to pass the connection or the (custom) datasource by your own if you run the report from withing your own application. The JasperStudio is just a designer tool with preview mode to design and test your report against a database/datasource. It's not made for "end-usage" by a customer or some "stupid/simple" report user. 

So just create a sql connection with ip/port/user/pw and pass this to the fillmanager in your calling app and pass it to the FillManager.

hth + regards

C-Box

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...