Jump to content
Changes to the Jaspersoft community edition download ×

Pass Java POJO object to Jasper report


alinizam.shaik

Recommended Posts

I'm new to Jasper reports. I'm trying to pass one POJO object as input data to the pdf report. I have seen to use either 

 

    String source = "/Users/shah/Documents/salary.jrxml";

    String outputPdf = "/Users/shah/Documents/SalaryCertificate.pdf";

 

My POJO is

 

    SalaryDto s = new SalaryDto();

 

  This "s" object will hold all data that needs to be passed as data source

 

    JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(<some beanCollection>)

 

 

I have to pass this "s" object as input source.

 

To which class Datasource I need to pass this "s" object? I want to fetch the s object values in Jasper report

 

Any ideas would be greatly appreciated.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...