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 :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

How to print barcode on the production route card

(2) ShareShare
ReportReport
Posted on by 26
I have the same question (0)
  • Suggested answer
    Aymen CHELBI Profile Picture
    574 on at

    Printing a barcode on the Production Route Card in Dynamics 365 Supply Chain Management (D365 SCM) requires modifying the Route Card SSRS report. Below is a step-by-step guide to achieve this:

     
     

    Steps to Print a Barcode on the Production Route Card in D365 SCM :

     
    To print a barcode on the Production Route Card:
    ✅ Modify the DP class to generate the barcode.

    ✅ Add a Barcode field in SSRS.

    ✅ Use a barcode font in SSRS.

    ✅ Deploy & Test the report.
     
     

     Modify the Data Provider (DP) Class

     

    The ProdRouteCardDP class is responsible for fetching data for the report. You need to modify it to include a barcode field.

    Steps:


    • Open Visual Studio.

    • Locate the ProdRouteCardDP class.

    • Extend the class and add the barcode field.

    •  

    Example Code:

    [DataContractAttribute]
    public class ProdRouteCardTmp_Extended extends ProdRouteCardTmp
    {
        private str barcode;
    
        [DataMemberAttribute]
        public str parmBarcode(str _barcode = barcode)
        {
            barcode = _barcode;
            return barcode;
        }
    }
    
    public class ProdRouteCardDP_Extended extends ProdRouteCardDP
    {
        public override ProdRouteCardTmp getProdRouteCardTmp()
        {
            ProdRouteCardTmp_Extended prodRouteCardTmp = super();
    
            // Generate Barcode using ItemId or any other field
            prodRouteCardTmp.parmBarcode(Barcode::encodeStr2of5(prodRouteCardTmp.ItemId));
    
            return prodRouteCardTmp;
        }
    }
    
     

    📌 Key Points:

     

    • We extend the ProdRouteCardTmp table to add a barcode field.

    • We override the getProdRouteCardTmp() method to generate the barcode.

    • Barcode::encodeStr2of5() is used to encode the ItemId as a barcode. You can change this to Barcode::encode128() for Code 128.


    •  
     

    Modify the SSRS Report Design

     

    I suggest duplicating the report design, making the necessary modifications on the duplicate, and then applying the required changes to ensure the call functions correctly.


    • Open RouteCard.ReportDesign in Visual Studio.

    • Add a TextBox where you want to display the barcode.

    • Set the Expression:
      =Fields!Barcode.Value
      

    • Change the Font to:

      • IDAutomationHC39M (for Code 39)

      • Free 3 of 9 (if using a free font)

      • Code 128 (for Code 128)


      •  


    •  
     

    Deploy and Test in D365

     

       

    Instead of modifying the DP class, you can:

     

    • Install a barcode font like Code 39 or Code 128.

    • In SSRS, use a TextBox with the barcode font.

    • Format the expression:
      ="*" & Fields!ItemId.Value & "*"
      

      (For Code 39, add * before and after the value)


    •  

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 > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 303 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 122 Super User 2025 Season 2

#3
Siv Sagar Profile Picture

Siv Sagar 105 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans