Change barcode type

Stimulsoft Reports.NET discussion
Post Reply
DavideBak
Posts: 13
Joined: Fri Aug 10, 2012 10:45 am

Change barcode type

Post by DavideBak »

Hello!
There is a way to change dynamically the barcode type of a barcode element in a template MRT?

Thank in advance,
Davide
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Re: Change barcode type

Post by Ivan »

Hello,

Can you please describe your task in details. And, if possible, send us a sample.

Thank you.
DavideBak
Posts: 13
Joined: Fri Aug 10, 2012 10:45 am

Re: Change barcode type

Post by DavideBak »

Hi, this is my MRT.
I have a simple barcode and at runtime I want (if it possible) to change the barcode type, for example from QRCode to DataMatrix.

Dimension and other properties will be always the same, I want only change the type from C# code. It's possible?

Thank you,
Davide
Attachments
Barcode Example.mrt
Barcode Example
(5.98 KiB) Downloaded 402 times
DavideBak
Posts: 13
Joined: Fri Aug 10, 2012 10:45 am

Re: Change barcode type

Post by DavideBak »

Ivan, can you help me?

Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: Change barcode type

Post by Jan »

Hello Davide,

You can use following code in BeforePrintEvent of barcode component:

Code: Select all

this.BarCode1.BarCodeType = 
	new Stimulsoft.Report.BarCodes.StiDataMatrixBarCodeType(
		40F, 
		Stimulsoft.Report.BarCodes.StiDataMatrixEncodingType.Ascii, 
		false, 
		Stimulsoft.Report.BarCodes.StiDataMatrixSize.Automatic);
Thank you.
Attachments
BarCodeTypeSample.mrt
(3.64 KiB) Downloaded 432 times
Post Reply