Jump to content
Changes to the Jaspersoft community edition download ×

strange behavior when generating csv file


teodoro

Recommended Posts

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,Beschreibung

11156,2006-08-24 00:00:00.0,B,578369,9500HAL,Nokia Kfz-Halterung passiv CR-6 für9500

11156,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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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