Count number of rows where a field is a specific value

后端 未结 2 585
悲&欢浪女
悲&欢浪女 2021-01-14 07:43

How do I count how many rows there are where the address field is null (or any other value), and then print the total in the Summary band?

I\'ve tri

2条回答
  •  囚心锁ツ
    2021-01-14 08:24

    Add a variable with these properties:

    Variable class : java.lang.Integer
    Caculation : Sum
    Reset Type : Report
    Increment type : Group
    Increment group : YourGroupName
    Variable expression : $F{yourField}.equals("") ? 0 : 1
    

提交回复
热议问题