teodoro Posted May 9, 2007 Share Posted May 9, 2007 Hi!I have programmed an applicaction, that should generate a csv file with JasperReports, but I have observed,that my generated csv file is wrong.I would like to show you a snippet from my csv file, it looks like this: KundenNummer,Datum,Belegart,Belegnummer,ArtNummer,Beschreibung11156,2006-08-24 00:00:00.0,B,578369,9500HAL,Nokia Kfz-Halterung passiv CR-6 für950011156,2006-08-24 00:00:00.0,B,578369,N93,"Nokia N93/UMTS Handy/3,2MP Camera/UpnP ",,,,,technology/Pearl Black The last line shouldn't be present, because this is text from the line before. The column "Beschreibung" of line before should be "Nokia N93/UMTS HANDY/3,2MP Camera/UpnP technology/Pearl Black", but there's a new line created for no special reason. This problem occures in other lines too, somtimes right within a word. I have tested my SQL query with a database tool and i can see no problem with the column-data there.I'm using a JRResultSetDataSource object with a JDBC-ResultSet when calling fillReport(). Did anybody encounter such a strange behaviour. Is this a bug or did i do something wrong? Thanks in advance. Link to comment Share on other sites More sharing options...
wegnerk Posted May 10, 2007 Share Posted May 10, 2007 Hi, thats not a strange behavior, because the export to csv is gridbased... so you have to watch the alignment of the fields... look here for more information:http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=8&id=23618#23618 Link to comment Share on other sites More sharing options...
teodoro Posted May 10, 2007 Author Share Posted May 10, 2007 Hi!I have discovered, that the problem occurs when you enable "strech with overflow" for an element and the text overflows. In CSV jasper reports seems to break long texts and prints the rest of the text in the next row. This strange behavoir for CSV reports doesn't follow any rule. Some lines weren't broken apart at all, although the column did overflow and others were split, but after random amounts of characters. Atm the only "solution" is not to use "stretch with overflow" at all. Definitely seems to be a bug. Link to comment Share on other sites More sharing options...
Teodor Danciu Posted May 11, 2007 Share Posted May 11, 2007 Hi, You should attach some relevant files to this thread.The best would be to attach the generated report in XML format (use the JRXmlExporter) and the corresponding CSV file. Thanks,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