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

Move a field when another field is null or hide


giroe

Recommended Posts

Good morning,

 

I have a question.
I have some textfields that have a print when expression.
And these textfields are pritty large, so when the print when returns false, I dont want a blanc block.
I want the other field(s) to move UP.


Example

 

ABCABC
EFGEFG <=this has a print when expression
HIJHIJHIJ

 

=> output is now

ABCABC

HIJHIJHIJ

 

=> I want:

ABCABC
HIJHIJHIJ

I hope someone can help me?
Thanks in advance

Link to comment
Share on other sites

  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

Should have tested it myself. I saw that option.

But I didnt think it would work with the 'print when' expression.

 

This was exactly what I needed.

But is there a way to say that 'some' elements should NOT move up :)?

I dont want the things at the bottom to shift up. It's some sort of footer, but it is not located in the footer-band.

 

Thanks in advance!

Link to comment
Share on other sites

I already tried that.

But that does not do the trick.

I do believe it should do the trick :)

When you 'click' on the position type it sais: How to anchor elements.

And thats just what I want, to anchor it to the bottom.

 

This is a small bug? Or are there any other solutions?

I think I'll create a footer for the things I want to be at the bottom :)

 

Btw, I dont know if its a bug, or it is something wrong with me.

But when I say to windows: open all jrxml files with iReport. In 3.0.0 it did not open iReport, in 3.1.4 it does open iReport, but it doesn't open the report.

(just opens iReport)

 

Btw, is it better to use 3.1.4 or is 3.0.0 still fine? Because I do like 3.0.0 better to work with. A lot has changed in 3.1.4 :)

 

Thanks for you replies,

 

Nick

Link to comment
Share on other sites

Do you have a sample report to illustrate the FixRelativeToBottom problem?

Regarding the iReport issues, I think you would get more educated answers on the iReport forum.  If you like iReport 3.0.0 better than 3.1.4, go ahead and use it for now.  The problem is that iReport 3.0.0 will stay as it is now and you will not have support for new JasperReports features.  At the time you will need this support, hopefully the new iReport will have caught up in terms of usability.

Regards,

Lucian

Link to comment
Share on other sites

Indeed, I should have realized that removeLineWhenBlank affects FixRelativeToBottom elements as well.

To achieve what you want, you can nest the "mobile" elements into a frame so that the changes caused by the element which is removed stay inside the frame and do not touch elements outside.  I'm attaching your report modified to use a frame.

Regards,

Lucian

Link to comment
Share on other sites

  • 8 years later...
  • 1 year later...
  • 11 months later...
  • 1 year 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...