How to use the barcode components with ACE Reporter
  1. Edit your report, put a TsctImageLabel control to your report in order to present the barcode symbol.
  2. Put a TBarcode1D barcode component, such as the TBarcode1D_Code39, TBarcode1D_EAN13, and TBarcode1D_Code128 to your form that the TsctReport component is in it.

    Also, put a TDBBarcode1D component to the form and link the TBarcode1D component to the TDBBarcode1D component if the database support is required.

  3. Create the OnBeforePrint event function for the TsctImageLabel control.

    In the event function, change the properties of the TBarcode1D component such as Barcode, Module, and Ratio, and adjust the bitmap size of the TsctImageLabel control in order to accommodate entire barcode symbol, then use the DrawTo method of the TBarcode1D component to draw the barcode symbol to the TsctImageLabel control.

    For example:


    BarcodeWidth, BarcodeHeight, SymbolWidth, SymbolHeight: Integer;



    Barcode1D_Code391.Barcode := '1235678';

    Barcode1D_Code391.Module := 2;


    with SctImageLabel1.Picture.Bitmap do


    Barcode1D_Code391.DrawToSize(BarcodeWidth, BarcodeHeight, SymbolWidth, SymbolHeight, Canvas);

    Width := BarcodeWidth;

    Height := 100;

    Barcode1D_Code391.DrawTo(Canvas, 0, 0);