tarz87 Posted April 22, 2020 Share Posted April 22, 2020 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.FALSECan anyone help me? Link to comment Share on other sites More sharing options...
tarz87 Posted April 22, 2020 Author Share Posted April 22, 2020 Help me please Link to comment Share on other sites More sharing options...
I am Leo Posted April 23, 2020 Share Posted April 23, 2020 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now