Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Barcode Storage in Table

(0) ShareShare
ReportReport
Posted on by 106

Can I store the BarCOde string as an image in the Blob field for every item, it is to be done on table level, not on reports?

Suggested video from Erik Hougaard converts the value in 0 and 1 format which is not expected value. Barcode is made up with the combination of Item no+qty+UOM for every entry.

with the native report of BarCode we can easily print on the report, but how can I store it in a blob

as the BarCode image has to be sent to the third part as a Base64 string.

I referred to this code and further added a table to store input

https://yzhums.com/11763/

https://robertostefanettinavblog.com/2021/04/07/barcode-in-business-central-cloud/

after using above mentioned function,ignore codabara only used 

 GenerateCode128();
        GenerateCode39();
        GenerateCode93();
as some other functions have error now

it is a sample written to store data

        /
    local procedure InsertValues(itemno: Code[20]; Input: text; BarCodeSymbology: Enum "Barcode Symbology")
    var
        ItemBarcode: Record "Bar Code Table";
        Base64: Codeunit "Base64 Convert";
        oStream: OutStream;
        istream: InStream;

    begin
        ItemBarcode.Init();
        ItemBarcode.BarCodeText := itemno;
      
        ItemBarcode.Image.CreateOutStream(oStream);

        oStream.WriteText(Input);
        ItemBarcode.Image.CreateInStream(istream);

        CopyStream(oStream, istream);
        ItemBarcode.Symbols := BarCodeSymbology;
        ItemBarcode.Insert();
    end;
  • Techworld Profile Picture
    106 on at
    RE: Barcode Storage in Table

    yes, this was the way people used to do for QRCode and BarCode as third party BarCode4me has stopped there services, many others have come in market with their third party APIs for use.

    some are paid and some has some limitations above which they are paid.

    Actually, I was looking for if new BarCode support introduced in Business central  encoded value can be stored as an image like a BarCode.

    So it can be send as Base64 string to third party system

  • Suggested answer
    Suresh Kulla Profile Picture
    47,688 on at
    RE: Barcode Storage in Table

    Check this repository, you need to use an API to generate and store in table as Blob

    github.com/.../Cod50121.GenerateBarcode.al

  • Techworld Profile Picture
    106 on at
    RE: Barcode Storage in Table

    For this I wrote that local procedure InsertValues() but I am not able to convert that in image, it is corrupting image. Is there a way I can store an image or generate value as Barcode looks

  • Suggested answer
    Suresh Kulla Profile Picture
    47,688 on at
    RE: Barcode Storage in Table

    If you are on latest version of BC you don't need any third party websites or code to generate code, you can use standard BC, please see below

    docs.microsoft.com/.../devenv-report-add-barcodes

    and you can store that encoded text in the standard field.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
YUN ZHU Profile Picture

YUN ZHU 311 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 242

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 201 Most Valuable Professional

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans