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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Adding Barcode to a Report

(0) ShareShare
ReportReport
Posted on by 890

Hi,

I need to add a barcode to my report. Does there exists any class or method for this.

 

Regards,

*This post is locked for comments

I have the same question (1)
  • Verified answer
    Brandon Wiese Profile Picture
    17,788 on at

    Yes, this is very easy.

    First, create a method like the following either on your Report element or in the relevant Section.

    display str 30 barcodeRefNum()
    {
        Barcode     barcode;
        ;

        barcode = Barcode::construct(BarcodeType::Code128);
        barcode.string(true, custPackingSlipJour.packingSlipId);

        return barcode.barcodeStr();
    }

    Note the BarcodeType enumeration that provide you with options other than 128.

    Then, add a String control to your report and use your new method as the data method.  You could also have attached the display method directly to the underlying table if that's better for you.  Finally, set the width, height, and alignment, and finally the font to your required symbology, i.e. "BC C128 Wide".  Code 39, 128, UPC, and several others come with the Dynamics AX client.

    Good luck!

  • Brandon Wiese Profile Picture
    17,788 on at

    My code example was from an existing SalesPackingSlip report where I used the custPackingSlipJour.packingSlipId field.  Obviously you would supply your own source field or value.

  • Saurabh P Singh Profile Picture
    890 on at

    Hi Brandon Wiese,

    Thanx alot for the help.

    Regards,

  • Priyanka Acharekar Profile Picture
    55 on at

    Hi,

    Add 'barcode.encode()' line before return statement.

    Regards,

    Priyanka

  • Brandon Wiese Profile Picture
    17,788 on at

    On AX 4.0 at least, the barcodeStr() does the encode() automatically.

    public BarCodeString barcodeStr()
    {
        if (!encoded)
            this.encode();

        return barcodeStr;
    }

     

  • Priyanka Acharekar Profile Picture
    55 on at

    @Brandon - yes u r correct.

  • Suggested answer
    mat miller Profile Picture
    5 on at

    what report will you add barcode to. If you are crystal reports or RDLC reports, the barcode generator sdk can help you.

  • cindy313 Profile Picture
    65 on at

    sure, as for the report , there are several types,you can refer to the barcode for reporting services as well as the barcode for crystal reports SDK found on google.

  • Community Member Profile Picture
    on at

    as for my experience , i printed barcode image in RDLC reports, you may check it

    hope help!

  • Community Member Profile Picture
    on at

    Hi, Jane313.

    Thanks for your nice sharing. I wonder whether it is the latest version of the Barcode Reader? I am also looking for a fine barcode scanner whose way of processing is simple and fast to help me scan aztec barcode. It will be better if it offers free trials for users to check. Any suggestion will be appreciated. Thanks in advance.

    Best regards,

    Pan

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans