Jump to content
Changes to the Jaspersoft community edition download ×

Missing chars when text stretches next page


2004 IR Help

Recommended Posts

By: C-Box - c-box

Missing chars when text stretches next page

2005-05-12 06:35

Hi...

 

I just updated our project to the latest JasperReports release 0.6.6.... (from 0.6.1)

 

I do have a very simple report that should just show a few fields. One field can contain lot's of lines (up to multiple pages -> no limit).

 

So I found a strange bug in the current JasperReportsRelease.

 

When the text on the last line of page 3 (it could also be another pagenumber - in my sample it's just page 3) is broken some characters are missing (in my tries there also were some lines missing sometimes)

 

I uploaded the error files here:

 

the Design: http://www.afps.de/JasperReports/LastLine3toFirstLine4_ERROR.jrxml

 

the OutPut as PDF: http://www.afps.de/JasperReports/LastLine3toFirstLine4_ERROR.pdf

 

here is the whole text:

http://www.afps.de/JasperReports/thelongtext.txt

 

if I change the textfield (key = textField --> contains $F{Text}) width from 475 to 479 pixel it works (it's the only change... all other elements/data are still the same)

 

here is the design where the text is okay:

http://www.afps.de/JasperReports/LastLine3toFirstLine4_OK.jrxml

 

and here is the output as PDF from that design:

http://www.afps.de/JasperReports/LastLine3toFirstLine4_OK.pdf

 

what's going wrong here?

Again: the error is at my examples on page 3 (last line) to Page 4 (first line) when the engines must break following line of text:

 

"Die Web Services Description Working Group hat neue Working Drafts der Web Services Description Language (WSDL) Version 2.0 ver  ntlicht. Dazu z䨬en ein erster vollst䮤iger Entwurf von "Primer",   arbeitete Versionen von "Part ..."

 

Please Teodor could you look into the engine and test what's happening?!? Just a small change in the width is cutting of some characters within a whole word.

 

tia

C-Box

 

 

 

 

By: Ethan Kayes - ebkayes

RE: Missing chars when text stretches next page

2005-05-12 08:01

Hi C-Box,

 

I think you are seeing the same error my team is working on. I am currently QA the following solution.

 

Try changing the font in your template from Helvetica to Courier. If the problem goes away you have found our strange error.

 

Here is our solution to this problem.

 

1. Try to convince your users to only user Courier. – This did not go over well with our user group either. Goto step 2.

 

2. Check the fonts installed on your server and the right to those files. (Sun Unix in my case) We discovered that some of our servers where missing fonts we supported and other where not available to the user who executes Jasper. – Solution we created a font directory under our JR structure with all the fonts we support. With a chmod of 777 for each font. In addition we pointed JR and our other process to look in this directory for font data.

 

As I pointed out earlier we are currently QA this solution. It did past our unit tests.

 

Regards

 

Ethan

 

 

 

 

 

By: C-Box - c-box

RE: Missing chars when text stretches next pa

2005-05-12 13:06

Well using Courier is no solution... the fontchange is unacceptable for our users (and for me also).

 

I can check the font-dir.... but the JasperFiles are generated within a SessionBean of JBoss and the JBoss is running on a Windows2000 Server the JasperPrint-Object is transfered to the Client.... so I don't think that there is something wrong with userrights. I saw, that a routine in JasperSource was changed that calculates something with the textwidth... perhaps Teodor should compare all changed he made from 0.6.1. to 0.6.6. concerning the calculation of text measurements.

 

I'll test tomorrow a bit further - perhaps I can find something.

 

C-Box

 

 

 

 

By: C-Box - c-box

RE: Missing chars when text stretches next pa

2005-05-23 06:18

up again.... the problem still exists

(also the solution for this bug

http://sourceforge.net/tracker/index.php?func=detail&aid=1196616&group_id=36382&atid=416703( didn't work with my problem from this thread.

 

Nobody an idea?

 

C-Box (in desperation)

 

 

 

 

By: C-Box - c-box

RE: Missing chars when text stretches next pa

2005-05-23 07:58

And again....

 

I just played around a bit more.....

 

two things:

 

1.) Why does Jasper syllabicate the complete word "Language" by itself to "Langu" and "age" ..... ?????

Why the engine doesn't split either before "Language" or after "Language" - I thought just if a whole word is lager than the given width of the field that it is contained than the engine does wordwraps by itself? But here are many blanks in the line where the engine could break more clever than just to separate "Langu" and "age" ...

 

2.) I stored the error output as "jrpxml" and searched for the text... and voilàthe missing part of "Language" is within the CDATA element.. so the last 5 letters are "Langu" (at Line 281 in the file I uploaded) ... so the viewer doesn't present all the data that are contained in a CDATA-Element.

 

take a look here for the stored JRPXML... that contains the letters that aren't displayed in previewer (and aren't printed also on Printer)

 

http://www.afps.de/JasperReports/ErrorDisplayedSavedFromPreview.jrpxml

 

I'm getting mad with that behaviour and I can't check in my whole work in our main project via CVS.

 

What about the TextMeasure method that calculates where to do a pagebreak when a (more or less huge) text is printed near the page bottom that needs to get wrapped to next page... a colleague of mine suggested to use a buffer of perhaps 5 percent at the calculation wheter a line of text needs getting wrapped to next page.. as far as he remembered right he had also some similiar problems with line breaking at an old 16bit program where he build a print method.

 

Hoping for your help...

 

C-Box

Link to comment
Share on other sites

  • 10 months later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • 11 months later...

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