How can I use filter for class type list?

0

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?
 
maria.pereira's picture
Joined: Sep 6 2016 - 1:50am
Last seen: 3 years 1 month ago

0 Answers:

No answers yet
Feedback
randomness