Jump to content
Changes to the Jaspersoft community edition download ×

How can i Pass CVS Datasource to SubReport


ankushchhabra

Recommended Posts

Hi Friends , I need your help in passubg csv datasource to subReports .

I would highly appreciate your suggestion or solutions.

I am using iReport 5.0 professional version.

I have a very complex report and that report fetch data from multiple (approx 10) csv files.

I have created subReports for each section of the reports and each subReport is working fine as a indivisual Report.

But when i try to integrate all the subReports into a main Reports , then i am not able to pass datasource to the subReports.

In Main , i created a parameter called CSVDS of type net.sf.jasperreports.engine.data.JRCsvDataSource with its default value as following new net.sf.jasperreports.engine.data.JRCsvDataSource(new File("D:\client\data\SR1.csv"))

and in order to make sure that CSVDS is getting value from SR1.CVS , i added a textbod with following expression and it returned true $P{CVSDS}.next() -- return true --which means that CSVDS gets populated from the data from SR1.csv

Further, i passed $P{CVSDS} as datasource to the subReport but the subReports was coming blank.

So , overall , i would like to know how can i pass csv datasource to subReports .

PS : I have tried almost all the solutions avaiable on Stack overflow  but nothing worked for me.

Regards, Ankush

Link to comment
Share on other sites

  • 3 years later...
  • 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...