Jump to content
Changes to the Jaspersoft community edition download ×

How to display a line from result of subreport


johann60280

Recommended Posts

Hello everybody!!

 

I have a problem on Ireport. I try to display a line  from a result of subreport. So I have a subreport who contains some result (or not). I use a parameter in this subreport who called "Return values". I affect this parameter in a variable called "affiche". So this variable contains "1" if there is one result in the subreport or "0" if there is nany result. So I try to hide a line who are next to the subreport if my variable contain "0".

This is my condition in line (on a parameter "Print When Expression"):

$V{affiche} != "0" ? Boolean.TRUE : Boolean.FALSE

 

But unfortunately it doesn't work. I put an image to show mu problem.

 

I hope my case is clear but if you want more explanation I will can give you. Thank you to help me :)

 

arbo_jasper.png.b511d285ddc2015b253bcce4019d064a.png

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Oh thank you for your help!! Yes it work but not completely..

Indeed my variable is of type java.lang.integer. I use what you give me with a modification:

$V{affiche}.intValue() != 0 ?
Boolean.TRUE
: Boolean.FALSE

But the line is misssing when my variable return not 0. Can you tell me why ?

 

arbo_jasper2.png.b4dc66d64168d3b253b4294d98455d4e.png

 

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