web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

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

How Print QR Code on word layout in Business Central

(0) ShareShare
ReportReport
Posted on by 195
i want to print barcode in word layout of BC Reports 
i used both but from 50107 it print in base64 which already saved in qr code field
AQ9ST05VUyBVU0EsIEluYy4CDzM5OTk5OTk5OTkwMDAwMwMTMjAyNS0wNC0yOVQxMTow
MDowMAQGNDMxLjQ2BQU1Ni4yOAYsa0lzREw2dERoZVFqYVRLWGs5QW5SL1RIUk1icnJ0RD
huSkY2aTBaanVNUT0HYE1FWUNJUUNCUnVmeFNTc2ViZ1Q5dU85dWhFaGxDSGRqSm9rTEZ
lem9jV2tNRS9MNzRnSWhBS2RQWERocms5T2Vmb2JNcGZGN0taYklwMnBqQ1JudU02amVv
KzBtVm81cwhYMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEyH/y6xbTfPADmZw+kSS3j8ZbrTICk
wy78e9uiKJP1IPUTI+ZQePww+H6EbqWVS/HZqOKV1vDbbn/C5mfmwra/A==
S-CR1022
10951073-6563-5649-4075-000009379014
and second one 50108 it print in this form 

AHEEEHA
BNFFFNBPMLJCACBKIOEOILNCAHFHAKJGAGIDEOAHJLMHBGAHFHADMGBPBLEHALIPAOB
HFPBNFFFNB
GKEGLEFFNMHEDFFGEGOCFDAIDBBDALDJJBFIPKEGHLCIPLABDEAOPGOHGLFKKMOMFM
MPLMHMPFJBH
AJAONBFNBLNOOHEFJAOCJEKBJDMDIGFCKNHFCCLKKPGBJFADDGJHDJNIIMIMHMMGCBAF
EJFCMMLAM
AEAGBIFGNFEJOPBKDIIHJINBGKGBEDAFFADLPJFEOJMFBFFGIJBOAHCNBHOBODJINMOKLM
CHBMEPK
IPAKEFFFGLM
report 50107 "Invoice List Report"
{
    UsageCategory = ReportsAndAnalysis;
    ApplicationArea = All;
    Caption = 'Invoice List Report';
    DefaultLayout = Word;
    WordLayout = 'Layouts\InvoiceListReport.docx'; // upload layout in project
 
    dataset
    {
        dataitem(Invoice; InvoiceTable)
        {
            column(InvoiceNo; Invoice.InvoiceNo) { }
            column(UUID; Invoice.UUID) { }
            column(QRCode; QRCode) { }
 
            trigger OnAfterGetRecord()
            begin
                GenerateQRCode();
            end;
        }
    }
 
    requestpage
    {
        layout
        {
            area(content)
            {
                group(Group)
                {
                    field(InvoiceNo; Invoice.InvoiceNo) { ApplicationArea = All; }
                }
            }
        }
    }
 
    var
        QRCode: Text;
 
    local procedure GenerateQRCode()
    var
        BarcodeSymbology2D: Enum "Barcode Symbology 2D";
        BarcodeFontProvider2D: Interface "Barcode Font Provider 2D";
    begin
        BarcodeFontProvider2D := Enum::"Barcode Font Provider 2D"::IDAutomation2D;
        BarcodeSymbology2D := Enum::"Barcode Symbology 2D"::"QR-Code";
 
        // take invoice UUID or your ZATCA QR text here
        QRCode := BarcodeFontProvider2D.EncodeFont(Invoice.UUID, BarcodeSymbology2D);
    end;
}
report 50108 "qr Report"
{
    UsageCategory = ReportsAndAnalysis;
    ApplicationArea = All;
    Caption = 'Invoice List Report';
 
    DefaultLayout = Word;
    WordLayout = 'Layouts\qrReport.docx'; // Upload your Word layout here
 
    dataset
    {
        dataitem(Invoice; InvoiceTable)
        {
            column(InvoiceNo; Invoice.invoiceNO) { }
            column(UUID; Invoice.UUID) { }
 
            // Encoded text for QR (will render as barcode in Word using BC QRCode font)
            column(QRCodeTxt; QRCodeTxt) { }
 
            trigger OnAfterGetRecord()
            begin
                GenerateQRCode();
            end;
        }
    }
 
    requestpage
    {
        layout
        {
            area(content)
            {
                group(Group)
                {
                    field(InvoiceNo; Invoice.invoiceNO) { ApplicationArea = All; }
                }
            }
        }
    }
 
    var
        QRCodeTxt: Text;
 
    local procedure GenerateQRCode()
    var
        BarcodeSymbology2D: Enum "Barcode Symbology 2D";
        BarcodeFontProvider2D: Interface "Barcode Font Provider 2D";
    begin
        if Invoice.QRCode = '' then
            exit;
 
        BarcodeFontProvider2D := Enum::"Barcode Font Provider 2D"::IDAutomation2D;
        BarcodeSymbology2D := Enum::"Barcode Symbology 2D"::"QR-Code";
 
        QRCodeTxt := BarcodeFontProvider2D.EncodeFont(Invoice.QRCode, BarcodeSymbology2D);
    end;
}
I have the same question (0)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 3,070

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,682 Super User 2025 Season 2

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,203

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans