arbitary Posted October 10, 2006 Share Posted October 10, 2006 I am creating a report with a csv datasource(its a tab-delimited file actually). It has 4 columns, which I specify in my report definition as COLUMN_1 to COLUMN_4. In the Java code, when I call the 'fillReport' method, I get the following error - 17:57:27,144 INFO [sTDOUT] net.sf.jasperreports.engine.JRException: Unknown column name : COLUMN_4 This happens only when the tab delimited file does not have data in the 4th column. This is very strange, since I have data missing in columns 2 and 3 too, but it works OK. Has anyone ever come across this? Any solutions will be appreciated. Link to comment Share on other sites More sharing options...
arbitary Posted October 10, 2006 Author Share Posted October 10, 2006 I think I found a bug here. In JRCsvDataSource, in the function parseRow(), for the last column, if there is no data, it is not added to the Vector of fields. So, if the last column is blank or null, the program thinks that there are (actual-1) columns. I removed this check and it works fine. Link to comment Share on other sites More sharing options...
teodord Posted October 23, 2006 Share Posted October 23, 2006 Hi, A fix for this was committed on the SVN repository. Thank you,Teodor 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