Hi, I try to design a report. Therefor the data is loades from a sql-datasource. the table contains sales positions with the date, when it was solt, the qty, the price and a sku. now I want to group the data by sku. (so I added a group) near to the sku I want the sum of the field qty, but!!! not the sum of all datasets, only the sum of that datasets, where the year of date is this year. Therefor I changed the expression of the sum-variable that way: new BigDecimal( ($F{sales_positions_vpo_dbeleg} >= '01.01.2010' ? $F{sales_positions_vpo_nmenge} : '0' ) ) but that doesn't seem to work. The result for one article is -2 in the report but in fact it is 45. So how could I only sum that datasets, which have a specific condition? ( changing the sql-query to: sum(vpo_nqty) where date >= '01.01.2010' group by .... in my situation is not possible, so the calculations has to be done in the report itself. Any suggestions? Thanks Marco