Jump to content

are there examples of subreports with csv-files ??


Recommended Posts


I'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 you


Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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 expression

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





Some hours later:

I get the Error:

 Time zone: Default

Error filling print... net.sf.jasperreports.engine.JRException: Unknown column name : S_Timestamp
Setting 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

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