How can i Pass CVS Datasource to SubReport

0

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

ankushchhabra's picture
Joined: Oct 7 2010 - 4:22am
Last seen: 1 month 3 weeks ago

1 Answer:

0

hello,

I have the same problem. I get a blank subreport with csv-files as datasource. Did you ever get a solution for your problem. I'm very interrested.

(see http://community.jaspersoft.com/questions/1034251/are-there-examples-sub...)

Thanks

Thomas

 

my_mailing's picture
Joined: Nov 4 2016 - 1:32am
Last seen: 3 years 1 month ago
Feedback
randomness