Skip to content

Count of number of specimens in a loan

redrinkwater edited this page Jun 17, 2021 · 1 revision

To get a count of number of specimens in a loan

Ensure the value you want to count is in the query (in this case barcode) Create a group:

  • View > report Groups
  • New
  • Name the group e.g Barcodes
  • Select the group expression as the field e.g. $F{Barcode}

Create a variable:

  • Name e.g. barcodeCounter
  • Variable Class Type java.lang.Integer
  • Calculation type: Count
  • Reset Type: Report Increment Type: Group Increment Group: group created above Custom Incrementer Factory Class: blank Variable expression: new java.lang.Integer(1) Initial value expression: new java.lang.Integer(0)

Add a field box Expression … Select from variables the variable created above e.g. $V{Barcodecounter} Set Eval. time to report

Clone this wiki locally