On the latest Telerik Reporting Designer when adding a QR Code I cannot seem to include the equals sign (=) as part of the value. A sample of the value I need to output is "=ABCD123" but this doesn't appear to be valid. I've tried to encode it, surround it in quotes and escape it with a backslash but no matter where in the text it is it always strips out the special characters.
Is there any way to include the equal sign at the beginning of a literal text value in a QR Code?
Thanks
8 Answers, 1 is accepted
Hello Stephen,
You may use the approach applied in the attached report:
- Put the value of the Barcode in a datasource (for example CSV DataSource).
- Assign the datasource to the report;
- Set the Value of the barcode to be: =Fields.FieldsName (in this case = Fields.Value)
Another option is to put the barcode in a List whose DataSource will be the CSV.
Regards,
Neli
Progress Telerik
How would this be achieved in C#?
Presently I just do this:
var barcode = (Telerik.Reporting.Barcode)barcodeBaseItem
barcode.Value = "=ABC123";
As it is a website I really don't want to have to write to an external CSV just to set the value of a string property
Thanks
In the Report Designer setting the barcode value to "= HtmlDecode(HtmlEncode('=XPHH2***'))" outputs the "=" sign. However doing the same thing in C# still strips out the special character:
barcode.Value = $"= HtmlDecode(HtmlEncode('{encryptedValue}'))";
Hi Stephen,
You can try to avoid this effect by using the following approach:
this.barcode1.Encoder = code128Encoder1;
this.barcode1.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(1.4D), Telerik.Reporting.Drawing.Unit.Inch(0.2D));
this.barcode1.Name = "barcode1";
this.barcode1.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(3.5D), Telerik.Reporting.Drawing.Unit.Inch(2.85D));
this.barcode1.Value = "= (\"=CE662WTJ\")";
You can check the attached cs report which demonstrates the solution.
Regards,
Neli
Progress Telerik
Thanks Neli. This appears to still strip out the "=". I've tried both on the template (preview) and on a printed document and the QR code only shows "CE662WTJ"
Regards
Hi Stephen,
To escape the equal sign in the Standalone designer, you can use the expression below:
= ("=CE662WTJ")
The approach is applied in the attached report.
Regards,
Neli
Progress Telerik