Our support engineers have assembled the top recommended solutions for you.
Microsoft Dynamics AX 2012CRM Connector in Microsoft Dynamics AX 2012Financials Management in Microsoft Dynamics AX 2012Upgrading to Microsoft Dynamics AX 2012
Microsoft Dynamics AX 2009
Application Object Server (AOS)
Enterprise Portal and Role Centers
Inventory Costing in Microsoft Dynamics AX 2009
Invoice Settlements/Discounts/Reversals
SSRS and SSAS Integration
Workflow
Hi,
I need to add a barcode to my report. Does there exists any class or method for this.
Regards,
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!
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.
Hi Brandon Wiese,
Thanx alot for the help.
Add 'barcode.encode()' line before return statement.
Priyanka
On AX 4.0 at least, the barcodeStr() does the encode() automatically.
public BarCodeString barcodeStr(){ if (!encoded) this.encode();
return barcodeStr;}
@Brandon - yes u r correct.
what report will you add barcode to. If you are crystal reports or RDLC reports, the barcode generator sdk can help you.