Barcodes

A barcode can be used as a component and directly inserted into a report. To do this:

  1. Do one of the following to open the Barcode Expert dialog. See the dialog.
  2. Select a dataset from the Barcode Resources drop-down list, and then specify the source of the barcode: a DBField, formula, summary, or parameter.
  3. Select the required barcode type from the Symbology drop-down list. You can preview the format of the selected symbology in the Sample box (for details about barcode symbologies, see Appendix 2: Barcode symbologies).
  4. Select the unit for the values of the quiet zone, narrow width, supplement, height and ratio from the Scale Mode drop-down list.
  5. Specify the space around the barcode in the Quite Zone field (most symbologies require quiet zones that precede and follow the barcode).
  6. Set the barcode bar width in the Narrow Width field.
  7. Specify the supplement of the barcode if necessary. If you select the barcode type as Code 39, Code 128/128A/128B/128C or Codabar, you will not need to set the supplement.
  8. Set the height of the barcode bars in the Height field.
  9. Specify the width ratio of the thick bar to the thin bar in the Ratio field if you selected the barcode type as Code 39 or Codabar. The ratio can only be 2.0 or 3.0. Any ratio value not equal to 2.0 or 3.0 will be regarded as 2.0.
  10. Change the default value of the barcode in the Default Message field if necessary.
  11. Select the Enable Checking Digits checkbox if you want to include check digits in the barcode.
  12. If you have selected the barcode type as Code 39, Code 128/128A/128B/128C, or Codabar, then you can check Display HR to display the barcode numbers together with the barcode.
  13. Upon finishing, click Insert to close the dialog, then click the mouse button in the location where you want the barcode to be displayed.

See also Barcode Expert dialog for detailed information about options in the dialog.

Notes:

See an example: The SampleComponents catalog, included with JReport Designer, contains reports that have examples of how each component type could be used in a report. For the barcode component example, open <install_root>\Demo\Reports\SampleComponents\Barcode.cls.