Jump to content
JasperReports Library 7.0 is now available ×

Problem with Stretch with overflow


fatbob

Recommended Posts

Hi everyone!

 

I have a text filed that has the Stretch with overflow set to true and it does start a new line. However, it does not move the next row down to compensate for it. By setting that text field to float and setting the field below it to float, that helps, but the text label does not follow suite.

 

Have a look at my screen shot to see what I mean. Is there a way to have the whole row move then when a field in the previous row stretched over two line?

 

http://img62.imageshack.us/img62/4765/wrapping.jpg

 

Thanks!

Link to comment
Share on other sites

  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

I am facing simular problems with "Stretch Type" option.

I have a report with three text fields in the detail band, two of them in a line above the third one. The second and the third fields have the option "Stretch With Overflow" selected. The first has the option "Stretch Type" seted to "Relative to Tallest Object" and all of them are the "Position Type" seted to "Fix Relative to Top".

With these options I have the same issue reported by fatbob (figure2.png).

If I change the option "Stretch Type" to "No stretch" in the first field and change the option "Position Type" to "Float" in the third field, the first field is not splitted according to the second one(figure1.png).

Now, if I return  the option "Stretch Type" to "Relative to Tallest Object" in the first field, the field in the second line, desappears (figure3.png).

I am sending attached the .jrxml file in order to help the understanding of this issue.
 

Thanks!

 

[edit] Now with the right jrxml file. Sorry!



Post Edited by claitongrings at 09/29/2009 14:43
Link to comment
Share on other sites

Steve,

 

Since you don't have frames in that old version, you could use a white line (invisible) to put in between the first row and the second row. Use positionType="Float" for the line and the elements below it.

When the text field will stretch, it will push the line which in turn will push the text fields downwards.

 

I hope this helps.
Teodor

 

Link to comment
Share on other sites

Claiton,

 

Your JRXML sample has only one text field. But that's beside the point.

 

Put the A and B text fields inside a frame, because they need to have the same height when B stretches. Use stretchType="RelativeToTallestObject" (it will be tallest object within the frame, no longer the band).

The use positionType="Float" for text field D.

 

I hope this helps.

Teodor

 

Link to comment
Share on other sites

teodord
Wrote:

Steve,

 

Since you don't have frames in that old version, you could use a white line (invisible) to put in between the first row and the second row. Use positionType="Float" for the line and the elements below it.

When the text field will stretch, it will push the line which in turn will push the text fields downwards.

 

I hope this helps.
Teodor

 

That's what I ended up doing. Works just fine.

 

Thanks!

Link to comment
Share on other sites

Hi,

I am too facing a problem in stretching the textField. I have attached the two jrxml files. I am too using very old version of jasper so I too do not have the frames. In the CommentsNotes_Opp.jrxml  see the <textField> for commentsNotes at line# 99. I have added isStretchWithOverflow="true". Also search for CommentsNotes_Opp.jasper added as a subreport.

When I add a large text only the first two notes are displayed and no other note is displayed. I am getting the feeling that after it reaches the maximum length of band it stop to display any more text.

Can you plz help me out in how to stretch the height of the band?

 

Thanks,
Muhammad Yousaf

 

Link to comment
Share on other sites

fatbob
Wrote:

teodord
Wrote:

Steve,

 

Since you don't have frames in that old version, you could use a white line (invisible) to put in between the first row and the second row. Use positionType="Float" for the line and the elements below it.

When the text field will stretch, it will push the line which in turn will push the text fields downwards.

 

I hope this helps.
Teodor

 

That's what I ended up doing. Works just fine.

 

Thanks!

I think I may have spoken too soon.

 

Using the white line worked for some of my reports, but for other reports it's not working. It seems to stretch properly for the first row, but then the subsequent rows are missing fields. Have a look at my screen shot and you'll see what I mean. I made the white line visible to show where I've placed it. Can someone tell me why the "Clinical Notes:" is pushed down properly on the first row, but then disappears from all other rows? I even tried moving the fields from the detail band to footer of a group, still didn't work.

Link to comment
Share on other sites

  • 1 year later...

Im Also experiencing the same problem, but the difference in my case is the format.

In our reports, we give our user's a choice of either pdf or txt. The pdf reports are working fine however, the reports generated for txt format contains truncated lines. Im using the same template for both PDF and TXT.

 

Inputs are very much appreciated.

Thanks

Link to comment
Share on other sites

  • 9 years later...

Hi Teodor,

I have a main report with "vertical" print order which has for sub report with "horizontal" print order. Each subreport I have some textfields and I selected "float" position, "Relative with tallest object" strech type and check strech with overflow. But it not working.

Can you please help me how to fix them?

Thanks

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