my_mailing Posted November 4, 2016 Share Posted November 4, 2016 HalloI'searching a running example of a mainreport with subreports and csv-files. Nowhere I can find a solution for csv-subreports. I hope I can find some help here.I'm new with jasper reports and I believe I started with the most difficult thing - with csv-subreports. My last "success" was a blank subreport in a running main report. I found this problem here also but no solutions. I can't believe that nobody has such a running subreport. And so I hope I can get a little running example.Thank youThomas Link to comment Share on other sites More sharing options...
Friendly User Posted November 5, 2016 Share Posted November 5, 2016 Hello Thomas,do you want to use one data source in main report and CSV files as data sources for subreports? If yes, take a look at this article if you are planning to use JasperServer as your report platform:http://community.jaspersoft.com/wiki/how-deploy-reports-tibco-jasperreports-server-subreports-use-different-data-sources Link to comment Share on other sites More sharing options...
my_mailing Posted November 7, 2016 Author Share Posted November 7, 2016 Hello Friendly user,you remember, i wrote: "I'm new with jasper reports..." and the work with jasper reports server i never tried. Sorry , I forgot to write: I'm using ireport designer and the link you wrote works direct with jasper reports server. So I don't know what I should do.I understand it so - that there is not a standard procedure using csv-datasources for subreports ? I must write a own data adapter for a default datasource? Is it possible to do it in the ireport designer ?I hoped i'm close to a solution, because the main report is compiled without errors an only the subreport is clear. I wrote a Data Source expressionnew net.sf.jasperreports.engine.data.JRCsvDataSource(new File("Z:Backup_To_USBHome_Logskum_file__komma_mit_header.csv")).setFieldDelimiter(",".charAt(0))but it does'nt work. Is there an error in the expression??I hope, you can help...ThanksThomas -----------------------------------------Some hours later:I get the Error: Time zone: DefaultError filling print... net.sf.jasperreports.engine.JRException: Unknown column name : S_TimestampSetting up the file resolver...net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Unknown column name : S_Timestamp at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:786) But the column Name S_Timestamp exist in the subreport only !!! And in the csv-file from the subreport don't exist header-lines.So i believe I have read the subreport and it doesn't understand the csv-file. But the subreport alone works. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now