Search Results for

    Show / Hide Table of Contents

    Class BarcodeObject

    Represents a barcode object. Represents a barcode object.

    Inheritance
    System.Object
    Base
    ComponentBase
    ReportComponentBase
    BarcodeObject
    Implements
    IFRSerializable
    Inherited Members
    ReportComponentBase.BeforePrint
    ReportComponentBase.AfterPrint
    ReportComponentBase.AfterData
    ReportComponentBase.Click
    ReportComponentBase.Exportable
    ReportComponentBase.ExportableExpression
    ReportComponentBase.Border
    ReportComponentBase.Fill
    ReportComponentBase.FillColor
    ReportComponentBase.Bookmark
    ReportComponentBase.Hyperlink
    ReportComponentBase.CanGrow
    ReportComponentBase.CanShrink
    ReportComponentBase.GrowToBottom
    ReportComponentBase.ShiftMode
    ReportComponentBase.Style
    ReportComponentBase.EvenStyle
    ReportComponentBase.HoverStyle
    ReportComponentBase.EvenStylePriority
    ReportComponentBase.PageBreak
    ReportComponentBase.PrintOn
    ReportComponentBase.BeforePrintEvent
    ReportComponentBase.AfterPrintEvent
    ReportComponentBase.AfterDataEvent
    ReportComponentBase.ClickEvent
    ReportComponentBase.FlagSimpleBorder
    ReportComponentBase.FlagUseBorder
    ReportComponentBase.FlagUseFill
    ReportComponentBase.FlagPreviewVisible
    ReportComponentBase.FlagSerializeStyle
    ReportComponentBase.FlagProvidesHyperlinkValue
    ReportComponentBase.IsCompilationNeeded
    ReportComponentBase.Cursor
    ReportComponentBase.MouseMoveEvent
    ReportComponentBase.MouseUpEvent
    ReportComponentBase.MouseDownEvent
    ReportComponentBase.MouseEnterEvent
    ReportComponentBase.MouseLeaveEvent
    ReportComponentBase.ApplyStyle(Style)
    ReportComponentBase.SaveStyle()
    ReportComponentBase.RestoreStyle()
    ReportComponentBase.DrawBackground(FRPaintEventArgs)
    ReportComponentBase.IsVisible(FRPaintEventArgs)
    ReportComponentBase.Validate()
    ReportComponentBase.Deserialize(FRReader)
    ReportComponentBase.OnClick(EventArgs)
    ReportComponentBase.OnAfterLoad()
    ReportComponentBase.HasClickListeners()
    ReportComponentBase.ResetData()
    ReportComponentBase.InitializeComponent()
    ReportComponentBase.FinalizeComponent()
    ReportComponentBase.CalcHeight()
    ReportComponentBase.OnBeforePrint(EventArgs)
    ReportComponentBase.OnAfterPrint(EventArgs)
    ReportComponentBase.OnAfterData(EventArgs)
    ComponentBase.AbsBottom
    ComponentBase.AbsBounds
    ComponentBase.AbsLeft
    ComponentBase.AbsRight
    ComponentBase.AbsTop
    ComponentBase.Anchor
    ComponentBase.Bottom
    ComponentBase.Bounds
    ComponentBase.ClientSize
    ComponentBase.Dock
    ComponentBase.GroupIndex
    ComponentBase.Height
    ComponentBase.Left
    ComponentBase.Right
    ComponentBase.Tag
    ComponentBase.Top
    ComponentBase.Visible
    ComponentBase.VisibleExpression
    ComponentBase.Printable
    ComponentBase.PrintableExpression
    ComponentBase.Width
    ComponentBase.CalcVisibleExpression(String)
    Base.Name
    Base.Restrictions
    Base.Flags
    Base.Parent
    Base.BaseName
    Base.ClassName
    Base.Report
    Base.Page
    Base.ChildObjects
    Base.AllObjects
    Base.ZOrder
    Base.IsAncestor
    Base.IsDesigning
    Base.IsPrinting
    Base.IsRunning
    Base.OriginalComponent
    Base.Disposed
    Base.SetProp(Base, Base)
    Base.FloatDiff(Single, Single)
    Base.DeserializeSubItems(FRReader)
    Base.ExtractDefaultMacros(String)
    Base.Dispose(Boolean)
    Base.Dispose()
    Base.SetFlags(Flags, Boolean)
    Base.SetReport(Report)
    Base.SetName(String)
    Base.SetParent(Base)
    Base.SetParentCore(Base)
    Base.FindObject(String)
    Base.CreateUniqueName()
    Base.Clear()
    Base.BaseAssign(Base)
    Base.AssignAll(Base)
    Base.HasParent(Base)
    Base.HasFlag(Flags)
    Base.HasRestriction(Restrictions)
    Base.InvokeEvent(String, Object)
    Base.GetCustomScript()
    Base.ExtractMacros()
    Base.IsHaveToConvert(Object)
    Base.GetConvertedObjects()
    Base.ForEachAllConvectedObjects(Object)
    Namespace: FastReport.Barcode
    Assembly: FastReport.Base.dll
    Syntax
    public class BarcodeObject : ReportComponentBase, IDisposable, IFRSerializable
    Remarks

    The instance of this class represents a barcode. Here are some common actions that can be performed with this object:

    • To select the type of barcode, use the Barcode property.
    • To specify a static barcode data, use the Text property. You also may use the DataColumn or Expression properties to specify dynamic value for a barcode.
    • To set a barcode orientation, use the Angle property.
    • To specify the size of barcode, set the AutoSize property to true and use the Zoom property to zoom the barcode. If AutoSize property is set to false, you need to specify the size using the Width and Height properties.

    Examples

    This example shows how to configure the BarcodeObject to display PDF417 barcode.

    BarcodeObject barcode;
    ...
    barcode.Barcode = new BarcodePDF417();
    (barcode.Barcode as BarcodePDF417).CompactionMode = CompactionMode.Text;

    Constructors

    BarcodeObject()

    Initializes a new instance of the BarcodeObject class with default settings.

    Declaration
    public BarcodeObject()

    Properties

    AllowExpressions

    Enable or disable of using an expression in Text

    Declaration
    public bool AllowExpressions { get; set; }
    Property Value
    Type Description
    System.Boolean

    Angle

    Gets or sets the angle of barcode, in degrees.

    Declaration
    public int Angle { get; set; }
    Property Value
    Type Description
    System.Int32

    AsBitmap

    Gets or sets values for forced use of a bitmap image instead of a vector

    Declaration
    public bool AsBitmap { get; set; }
    Property Value
    Type Description
    System.Boolean

    AutoSize

    Gets or sets a value that determines whether the barcode should handle its width automatically.

    Declaration
    public bool AutoSize { get; set; }
    Property Value
    Type Description
    System.Boolean

    Barcode

    Gets or sets the barcode type.

    Declaration
    public BarcodeBase Barcode { get; set; }
    Property Value
    Type Description
    BarcodeBase

    Brackets

    Gets or sets brackets for using in expressions

    Declaration
    public string Brackets { get; set; }
    Property Value
    Type Description
    System.String

    DataColumn

    Gets or sets a data column name bound to this control.

    Declaration
    public string DataColumn { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Value must be in the form "Datasource.Column".

    Expression

    Gets or sets an expression that contains the barcode data.

    Declaration
    public string Expression { get; set; }
    Property Value
    Type Description
    System.String

    HideIfNoData

    Gets or sets a value that determines whether it is necessary to hide the object if the barcode data is empty.

    Declaration
    public bool HideIfNoData { get; set; }
    Property Value
    Type Description
    System.Boolean

    HorzAlign

    Gets or sets the horizontal alignment of a Barcode object.

    Declaration
    public BarcodeObject.Alignment HorzAlign { get; set; }
    Property Value
    Type Description
    BarcodeObject.Alignment

    NoDataText

    Gets or sets the text that will be displayed if the barcode data is empty.

    Declaration
    public string NoDataText { get; set; }
    Property Value
    Type Description
    System.String

    Padding

    Gets or sets padding within the BarcodeObject.

    Declaration
    public Padding Padding { get; set; }
    Property Value
    Type Description
    Padding

    ShowMarker

    Gets or sets values for hiding or showing barcode markers

    Declaration
    public bool ShowMarker { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowText

    Gets or sets a value that indicates if the barcode should display a human-readable text.

    Declaration
    public bool ShowText { get; set; }
    Property Value
    Type Description
    System.Boolean

    SymbologyName

    Gets or sets the symbology name.

    Declaration
    public string SymbologyName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    The following symbology names are supported:

    • "2/5 Interleaved"
    • "2/5 Industrial"
    • "2/5 Matrix"
    • "Codabar"
    • "Code128"
    • "Code39"
    • "Code39 Extended"
    • "Code93"
    • "Code93 Extended"
    • "EAN8"
    • "EAN13"
    • "MSI"
    • "PostNet"
    • "UPC-A"
    • "UPC-E0"
    • "UPC-E1"
    • "Supplement 2"
    • "Supplement 5"
    • "PDF417"
    • "Datamatrix"
    • "QRCode"

    Examples
    barcode.SymbologyName = "PDF417";
    (barcode.Barcode as BarcodePDF417).CompactionMode = CompactionMode.Text;

    Text

    Gets or sets the barcode data.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    Zoom

    Gets or sets a zoom of the barcode.

    Declaration
    public float Zoom { get; set; }
    Property Value
    Type Description
    System.Single

    Methods

    Assign(Base)

    Copies the contents of another, similar object.

    Declaration
    public override void Assign(Base source)
    Parameters
    Type Name Description
    Base source

    Source object to copy the contents from.

    Overrides
    ReportComponentBase.Assign(Base)
    Remarks

    Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is

    destination.Assign(source);

    which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll method.

    See Also
    AssignAll(Base)

    CreateSwissQR(QRSwissParameters)

    Initialize current BarcodeObject as Swiss QR.

    Declaration
    public void CreateSwissQR(QRSwissParameters parameters)
    Parameters
    Type Name Description
    QRSwissParameters parameters

    Parameters of swiss qr.

    Draw(FRPaintEventArgs)

    Declaration
    public override void Draw(FRPaintEventArgs e)
    Parameters
    Type Name Description
    FRPaintEventArgs e
    Overrides
    ReportComponentBase.Draw(FRPaintEventArgs)

    GetData()

    Gets the data from a datasource that the object is connected to.

    Declaration
    public override void GetData()
    Overrides
    ReportComponentBase.GetData()
    Remarks

    This method is called by the report engine before processing the object.

    Do not call it directly. You may override it if you are developing a new FastReport component. In this method you should get the data from a datasource that the object is connected to.

    GetDataAsync(CancellationToken)

    Declaration
    public override async Task GetDataAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    ReportComponentBase.GetDataAsync(CancellationToken)

    GetExpressions()

    Gets all expressions contained in the object.

    Declaration
    public override string[] GetExpressions()
    Returns
    Type Description
    System.String[]

    Array of expressions or null if object contains no expressions.

    Overrides
    ReportComponentBase.GetExpressions()
    Remarks

    Do not call this method directly. You may override it if you are developing a new component for FastReport.

    This method is called by FastReport each time before run a report. FastReport do this to collect all expressions and compile them. For example, GetExpressions method of the TextObject class parses the text and returns all expressions found in the text.

    RelocateAlign()

    Relocate BarcodeObject based on alignment

    Declaration
    public void RelocateAlign()

    RestoreState()

    Restores the object's state after printing it.

    Declaration
    public override void RestoreState()
    Overrides
    ReportComponentBase.RestoreState()
    Remarks

    This method is called by the report engine after processing the object.

    Do not call it directly. You may override it if you are developing a new FastReport component. In this method you should restore the object properties that were saved by the SaveState() method.

    SaveState()

    Saves the object's state before printing it.

    Declaration
    public override void SaveState()
    Overrides
    ReportComponentBase.SaveState()
    Remarks

    This method is called by the report engine before processing the object.

    Do not call it directly. You may override it if you are developing a new FastReport component. In this method you should save any object properties that may be changed during the object printing. The standard implementation saves the object's bounds, visibility, bookmark and hyperlink.

    Serialize(FRWriter)

    Serializes the object.

    Declaration
    public override void Serialize(FRWriter writer)
    Parameters
    Type Name Description
    FRWriter writer

    Writer object.

    Overrides
    ReportComponentBase.Serialize(FRWriter)
    Remarks

    Do not call this method directly. You should override it if you are developing a new component for FastReport.

    This method is called when the object needs to save the state. It may happen when:

    • saving the report to the file or stream;
    • saving the report to the designer's undo buffer;
    • assigning the object to another object using the Assign(Base) or AssignAll methods;
    • saving the object to the designer's clipboard;
    • saving the object to the preview (when run a report).

    UpdateAutoSize()

    Declaration
    public void UpdateAutoSize()

    Implements

    IFRSerializable
    Back to top © 1998-2025 Copyright Fast Reports Inc.