We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bar Codes for SSRS 2005

Can someone tell me how to create a barcode which will emulate the ‘ENTER’ key when scanned by a bar code reader



Hi Alistair,

Thanks for considering Aspose.

By barcode reader, do you mean BarCodeReader class of the component or the hardware device for scanning barcodes?

You can use Environment.NewLine variable in CodeText. While reading the barcode using BarCodeReader class and showing its value on form/control, it will display a new line. Here is a short sample:

// generate barcode

BarCodeBuilder builder = new BarCodeBuilder(Environment.NewLine, Symbology.Code39Extended);
MemoryStream stream = new MemoryStream();
builder.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp);

// recognize barcode
stream.Position = 0;

BarCodeReader reader = new BarCodeReader(new Bitmap(stream));

if (reader.Read(BarCodeReadType.Code39Extended))


textBox1.Text = reader.ReadCodeText();




Sorry, I don;t think I was very clear in my original post.

What I am trying to do is -

In the Layout tab of SSRS 2005, where you design your report I have dragged a bar code object from the toolbox and want to configure the properties to create a bar code that my hardware (the actual scanning device) will read and interpret as a new line

Do I need to first drag the bar code onto the layout and then edit the XML code of the report?

Please try to set Chr(13)+Chr(10) value for CodeText property in the designer window of the barcode control. Character 13 is for carriage return and 10 is for line feed. It works as expected in controls like textbox. Please test it with your scanning device.

I am also attaching the screenshot of the property designer window of the barcode control.