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

How can I use filter for class type list?


maria.pereira

Recommended Posts

I`m doing a report and I want that this report can filter the generated documents for many factors, as data, payment, type, etc. For that I use filter expression, but I want that in the report show up the filter used, and there is one these factors that is not working, the parameter of class java.util.List. I want that just appear if the filter was used, otherwise it does not seem anything. In my report is print just the sentence before the variable that should be print.

 
The filter used: 
 
($P{docNo} != null ? $F{numer}.equals($P{docNo}) : true ) && ($P{warehouse} != null ? $F{symbol}.equals($P{warehouse}): true) && ($P{kthNo} != null ? $F{idKth}.equals(Integer.parseInt($P{kthNo})) : true ) && ($P{tdokList} != null ?$P{tdokList}.contains($F{typ}): true )  && ($P{dateFrom} != null ? $F{dataDok}.after(new java.sql.Date($P{dateFrom})) : true ) && ($P{dateTo} != null ? $F{datawe}.before(new java.sql.Date($P{dateTo} )): true) && (($P{unsettled} != null && $P{unsettled}) ? ( $F{settledPosCount}!=$F{posCount} ) : true )  &&  (($P{settled} != null && $P{settled} )? ( $F{settledPosCount}==$F{posCount} ) : true)
 
 
And the expression used for the other parameters: 
 
(($P{dateFrom}.equals(""))&&($P{dateTo}.equals("")))?"":("nData od: "+(new SimpleDateFormat("dd-MM-yyyy").format($P{dateFrom}))+ " do: "+(new SimpleDateFormat("dd-MM-yyyy").format($P{dateTo})))+
(($P{docNo} != null && !$P{docNo}.isEmpty())?("nNr dok.: "+$P{docNo}):"")+
(($P{warehouse} != null && !$P{warehouse}.isEmpty())?("nMagazyn: "+$P{warehouse}):"")+
(($P{kthNo} != null && !$P{kthNo}.isEmpty())?("Nr Kth.: "+$P{kthNo}):"")+
("nRozliczone: "+($P{settled}?"tak":""))+
("nNie rozliczone: "+($P{unsettled}?"tak":""))
 
 
For the parameter of list type I`m using: (($P{tdokList} != null && !$P{tdokList}.isEmpty())?("Typ dokumentu: "+$P{tdokList}):"") and it`s not working.
 
Anyone know how I can fix this?
 
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...