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

Print when does not work


tarz87

Recommended Posts

Hi guys, 

I have a question, I have a subreport that prints many lines because it is in the detail band, for me this is fine, but I want to filter the rows based on parameters when I print the report, I used the option "print when" to set the Boolean condition but not it works, this works with only one parameter. 

The condition is:

(!"N".equals($P{Chk_Amministratori})
|| ($F{nosCod} != $P{CheckDinamico1}
|| $F{nosCod} != $P{CheckDinamico2}
|| $F{nosCod} != $P{CheckDinamico3}
|| $F{nosCod} != $P{CheckDinamico4}
|| $F{nosCod} != $P{CheckDinamico5}
|| $F{nosCod} != $P{CheckDinamico6}
|| $F{nosCod} != $P{CheckDinamico7}
|| $F{nosCod} != $P{CheckDinamico8}
|| $F{nosCod} != $P{CheckDinamico9}
|| (!"N".equals($P{Chk_Amministratori})
|| ($F{nosCod} != $P{CheckDinamico1}
|| $F{nosCod} != $P{CheckDinamico2}
|| $F{nosCod} != $P{CheckDinamico3}
|| $F{nosCod} != $P{CheckDinamico4}
|| $F{nosCod} != $P{CheckDinamico5}
|| $F{nosCod} != $P{CheckDinamico6}
|| $F{nosCod} != $P{CheckDinamico7}
|| $F{nosCod} != $P{CheckDinamico8}
|| $F{nosCod} != $P{CheckDinamico10}) ? Boolean.TRUE : Boolean.FALSE

 

If I put a parameter it works, for example

$F{nosCod} != $P{CheckDinamico10} ? Boolean.TRUE : Boolean.FALSE

Can anyone help me?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You don't need to use the Ternary operator in your expression because the first expression returns a boolean.

To verify your expression, you should put that into the value of one Text field and check the result after it is printed.

The Print when expression works well. Your expression may have an error.

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