Jump to content
We've recently updated our Privacy Statement, available here ×

Change box size at filling


2004 IR Help

Recommended Posts

By: joã¯esteves - jrfe

Change box size at filling

2005-07-26 02:09

Hi,

 

I have to change a text field or a rectangle width depending on a value that is passed as a field. I haven't found a way to do this because jasper doent seem to accept attributes like width to be filled like this: width = $F{widthValue} , so now i wondered if it is possible to draw a rectangle in a scriptlet.

 

Please help me, i'm kind of in a hurry.

 

thanks to all

 

 

 

 

By: Piel Yves - narmataru

RE: Change box size at filling

2005-07-26 02:20

Hello,

Into the balise <textField> of your <textElement>, put the parameter : isStretchWithOverflow="true"

So the size of the box will grox up with your text :)

 

If you use iReport to make your reports, into the 'TextField' element option tab, there a check box with 'Stretch with overflow' to do that.

So after you have to set 'positionType' attributes to 'Float' in order to take care about the grow up.

 

bye.

 

 

 

 

By: C-Box - c-box

RE: Change box size at filling

2005-07-26 02:39

I don't think that this is the solution "jrfe" would like to have...

 

This is just stretching downwards as the text is longer than the predefined width.... I guess he wants to make the width larger at runtime depending on a certain value of a field...so that the field goes more right, isn't it.

 

but this is not possible (AFAIK) because you are changing the layout at runtime and the fill engine could get confused. I wouldn't change a compiled report design at runtime... better load the design change it to your needs ... recompile it to get a JasperReport Object and fill it finally.

 

C-Box

 

 

 

 

By: joã¯esteves - jrfe

RE: Change box size at filling

2005-07-26 02:59

"but this is not possible (AFAIK) because you are changing the layout at runtime and the fill engine could get confused. I wouldn't change a compiled report design at runtime... better load the design change it to your needs ... recompile it to get a JasperReport Object and fill it finally. "

 

And how can i do that? (only two weeks of experience in jasperreports).

 

Is it possible to obtain the jrxml of a compiled and already filled report? If so my problem is solved, cause in that case i could alter the xml directly.

 

 

 

 

By: joã¯esteves - jrfe

RE: Change box size at filling

2005-07-26 02:56

Thanks a lot for your quick answer, i'll explore your sugestion, however what i really wished for was to be able to say specifically the value of the box width.

 

Once again, thank you very much for your attention.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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