Skip to content

IsBarcodeRussianPost causing an error #836

Description

@nasser-rawda

Describe the bug
2D barcodes are failing to print barcode with value "RP0603BRD0733KL". It happens to most 2D barcodes.
I can see that the function IsBarcodeRussianPost returns true and then it expects all chars to be digits after the second char.

To Reproduce
Add new Code128 barcode, set the value to "RP0603BRD0733KL" and then run the report.

Expected behavior
It should show a regular barcode without making it Russian barcode.

Stacktrace
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at FastReport.Barcode.LinearBarcodeBase.CheckSumModulo10(String data)
at FastReport.Barcode.LinearBarcodeBase.DrawBottomLabel(IGraphics g, Single zoom, RectangleF barArea, RectangleF drawArea)
at FastReport.Barcode.LinearBarcodeBase.DrawBarcode(IGraphics g, RectangleF displayRect)
at FastReport.Barcode.BarcodeObject.DrawBarcode(FRPaintEventArgs e)
at FastReport.Barcode.BarcodeObject.Draw(FRPaintEventArgs e)
at FastReport.ReportPage.Draw(FRPaintEventArgs e)
at FastReport.Preview.PreviewWorkspace.DrawPages(Graphics g)
at FastReport.Preview.PreviewWorkspace.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at FastReport.DevComponents.DotNetBar.PanelX.WndProc(Message& m)
at FastReport.Preview.PreviewWorkspace.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Device (please complete the following information):
Windows Desktop
Version: 2026.1.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions