New User? Sign Up  |  Sign In  |  Help
Barcode support and
tutorials from IDAutomation
and the community.
Click for the BBB Business Review of this Computers Hardware, Software & Services in Tampa FL
Resolved Questions

Add Parentheses to DataMatrix Output from Crystal Reports

We need to encode three numbers in brackets (95, 96, and 97) in a Datamatrix code, but we can't find the right syntax to do so. The numbers are printed, but not the brackets.

Formula used : DataToEncode = cStr("(95)"+ToText({SORDERQ.SOHNUM_0})+"(96)"+ToText({SORDERQ.SOPLIN_0})+"(97)"+ToText({SORDERQ.YNUMBP_0}))
When red, the barcode will show: 95CDE1-14-03101964000,00971,00
We want to see:(95)CDE1-14-03101(96)4000,00(97)1,00

We also tried to use the ~:
DataToEncode = cStr(ToText("~d04095~d041")+ToText({SORDERQ.SOHNUM_0})+("~d04096~d041")+ToText({SORDERQ.SOPLIN_0})+("~d04095~d041")+ToText({SORDERQ.YNUMBP_0}))

But the result is the same, no brackets.

The parameters for the formula are:
E_ASCII = 3
E_C40 = 1
E_TEXT = 2
E_BASE256 = 0

'Modify the next 3 lines to change optional parameters;
processTilde = 1
PreferredFormat = 0 '-1 is auto-format
EncodingMode = E_BASE256

Operating System: Windows

Application: Crystal Reports

11-26-14     9.9 year(s) ago    

  Report Abuse

 

James

Best Answer

It is important to point out:
· GS1 standards do not mandate the use of parentheses (with respect to AIs) in the decoded data itself.
· If the showing of parentheses around an AI is desired in the human-readable text (HR) that accompanies a barcode, the addition of a separate text object (under/above the barcode object) is recommended:
image

Posted 9.9 year(s) ago

(0)
(0)
  Report Abuse
 
Find Interesting
 
Email to Others
 
Bookmark
 
Subscribe to Answer Alert
No comments yet.     Be the first to comment.
Other Answers (2)
OK, I found the answer to my own question :-)

If you want the brackets to be printed when the datamatrix is red, then one has to use the tilde escape character +d (~d).

My formula now looks like this:
DataToEncode = "~d04095~d041"&ToText({SORDERQ.SOHNUM_0})&"~d04096~d041"&ToText({SORDERQ.SOPLIN_0})&"~d04097~d041"&ToText({SORDERQ.YNUMBP_0})

"~d04095~d041" will print (95) when scanned.
040 is the ASCII code for ( and 041 for )

Posted 9.9 year(s) ago

(0)
(0)
   Report Abuse
When producing GS1-DataMatrix with the Crystal Reports Data Matrix Native Barcode Generator, the following considerations must be taken into account:

1. ProcessTilde must be set to 1 (On/True).
2. GS1 formatting using Application Identifiers (AIs) must be used, in this case using parentheses to surround the AIs.
3. An understanding that the parentheses used to surround/distinguish the AIs will not be shown in the output.

Performing the following created a correct GS1-DataMatrix barcode:
1. Set Crystal Syntax to Basic Syntax.
2. Set DataToEncode = "(95)CDE1-14-03101(96)4000,00(97)1,00"
3. Set*:
· processTilde = 1
· PreferredFormat = -1 '-1 is auto format
· EncodingMode = E_BASE256


*For parameter definitions/options, refer to the manual.

Which produces a correctly-formatted GS1-DataMatrix barcode (zoomed here in the Crystal Reports field):
image

Which correctly scans as:
]d295CDE1-14-03101<GS>964000,00<GS>971,00

Where ]d2 is the correct FNC1 (unprintable character) and <GS> (Group Separator) is the correct FNC (unprintable character) for the trailing AIs.

Posted 9.9 year(s) ago

(0)
(0)
   Report Abuse
Email this question link to friends
You must enter an email address, if name is entered or vice-versa for each friend.
Friend #1 -
Friend #2 -
Friend #3 -
Friend #4 -
Friend #5 -
  Your comment on this question
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allows to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must starts with "http://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always starts with " http:// ")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 Characters are allowed. Current Count: 0
  Your comment on this answer
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript 
  Allow you to add a link. Added links would only be converted to actual clickable link, when the domain of the link is white-listed by administrator.
Caption :
Link URL :
(Must start with "http://" or "https://")
Add  |   Cancel
  Allow to insert an image. Must be among the following file types - *.jpg, *.gif, *.png & *.bmp.
Image Url :   Upload New
(Image url must always start with "http://" or "https://")
Width : pixels
(Must not be greater than 450px. Enter 0px for no resize)
Add  |   Cancel
  Allow to insert YouTube video. Insert the video embed code.
Embed Code :
Add  |   Cancel
Up to 5000 characters are allowed. Current Count: 0

You may answer and comment on any thread according to the Terms and Conditions.

 © Copyright 2021 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus Join us on LinkedIn Follow us on Twitter Like us on Facebook