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
Open Questions Bookmark and Share

Crystal reports 8.5 QR - chars limited to 254

Hello!
Crystal report 8.5 limits chars to 254. My client needs 3 different numbers to QR. Length of these values are 46 chars (254-46 = 208 left).
When I use function IDAutomationQRCodeEncoderQRGet(i) It encodes it to over 254 chars. Is there way to bypass this somehow?

And is there documents for this function?

br. Janek

numberVar Segments:= IDAutomationQRCodeEncoderQRSet(DataToEncode, ProcTilde, EncMode, Version, ErrorCorrectionLevel,0,0);
For i:=0 to Segments Do
(
CompleteBarcodeString := CompleteBarcodeString + IDAutomationQRCodeEncoderQRGet(i);
);
CompleteBarcodeString


06-16-20     27 day(s) ago    

  Report Abuse
Find Interesting
 
Email to Others
 
Bookmark
 
Subscribe to Answer Alert
No comments yet.     Be the first to comment.
Answers (8)
I recommend trying VB Syntax such as the formula I entered below. Make sure you are also using the latest version of the IDAutomation product. If you can upgrade Crystal to version 9 or greater I believe that would also resolve the issue.

Posted 24 day(s) ago

(0)
(0)
   Report Abuse
The issue is that stringVar max length is 254.

But I can add many StringVars into crystal report text object that displays QR code.

Posted 25 day(s) ago

(0)
(0)
   Report Abuse
Unfortunately it does not work.
I have an idea to fix this issue I have but it requires me to have good understand how 'IDAutomationQRCodeEncoderQRGet(numberVar)' works.
I need to know which part of encoded code includes data from 'DatatoEncode'.

So far I did figure out that ending is always same (HHHHHHHPHHHHPHHHHHHPPHPPHHPP)

Posted 25 day(s) ago

(0)
(0)
   Report Abuse
It looks like you are trying to encode GS1 QR Code. The lowest version of Crystal Reports we have to test with is 9. In version 9 this formula works - but in VB Syntax. Note that for GS1 QR Code, you must use ~1 for each FNC1 and not include another ~1 unless you need another FNC1.

Dim DataToEncode as String
'Modify DataToEncode to connect to the data source;
'For example: 'DataToEncode = ({DataTable.DataField})
'To append the FNC 1 character to the beginning of your data use ~1.
'For example: 'DataToEncode = "~1" & ({DataTable.DataField})
DataToEncode = "~1011234567890123021111111111032222222222"

' Symbology Parameters
Dim ProcTilde As Number
ProcTilde = 1 'If = 1 the Tilde will be processed | http://www.idautomation.com/barcode-faq/2d/qr-code/#Control_Characters
Dim EncMode As Number
EncMode = 0 '0=Binary | 1=0nly numbers and uppercase letters | 2=Numbers only
Dim ErrorCorrectionLevel As Number
ErrorCorrectionLevel = 0 '0=15% | 1=30% | 2=7% | 3-25% | http://www.idautomation.com/barcode-faq/2d/qr-code/#Encoding_Modes
Dim Version As Number
Version = 0 '0=Automatic | http://www.idautomation.com/barcode-faq/2d/qr-code/#Symbol_Version
Dim BestMask As Number
BestMask = 1 'If = 1 a best mask pattern will be processed
Dim QuietZone As Number
QuietZone = 0

' End Symbology Parameters
Dim CompleteBarcodeString as String
CompleteBarcodeString = ""
Dim i As Number
i = 0
Dim Segments As Number
Segments = IDAutomationQRCodeEncoderQRSet(DataToEncode, ProcTilde, EncMode, Version, ErrorCorrectionLevel, BestMask, QuietZone)
For i = 0 to Segments
CompleteBarcodeString = CompleteBarcodeString & IDAutomationQRCodeEncoderQRGet(i)
Next i
Formula = CompleteBarcodeString



Posted 27 day(s) ago

(0)
(0)
   Report Abuse
That does not work. It gives that same error. And crystal reports 8.5 uses & not + ;)

Posted 27 day(s) ago

(0)
(0)
   Report Abuse
Try:
stringVar DataToEncode := "(01)1234567890123(02)1111111111(03)2222222222"
and see if that works. If it does, its not something with Crystal Reports itself. I believe you have to use "+" instead of "&" in the Crystal syntax, so maybe DataToEncode:= a + b + c; would work.


Posted 27 day(s) ago

(0)
(0)
   Report Abuse
New blank file.
I somewhy I can not upload zip file.

Formula field code:

//Symbology Parameters
// Set DataToEncode:= to the field of the data source,
// for example: stringVar DataToEncode:= ({TestData.DataField});
stringVar a := "(01)1234567890123";
stringVar b := "(02)1111111111";
stringVar c := "(03)2222222222";
//stringVar DataToEncode:= a & b & c; //this does not work
stringVar DataToEncode := Right(a&b&c, 36); //this works, but it is missing 12 chars
numberVar ProcTilde:= 0;
numberVar EncMode:= 0;
numberVar Version:= 0;
numberVar ErrorCorrectionLevel:= 0;

// - Do not make changes below this line -
stringVar CompleteBarcodeString:="";
numberVar i:=0;

numberVar Segments:= IDAutomationQRCodeEncoderQRSet(DataToEncode, ProcTilde, EncMode, Version, ErrorCorrectionLevel,0,0);
For i:=0 to Segments Do
(
CompleteBarcodeString := CompleteBarcodeString + IDAutomationQRCodeEncoderQRGet(i);
);
CompleteBarcodeString

Posted 27 day(s) ago

(0)
(0)
   Report Abuse
this is not a known issue. Can you find the example included in the purchased product and then modify the example with static data and see if the issue still exists there. If it does, Place it in a zip file and upload it to this incident so we can evaluate more.

Posted 27 day(s) ago

(0)
(0)
   Report Abuse
Other Open Questions in Crystal Reports UFL
Edit your comment. Click save when finished.
Question Title Crystal reports 8.5 QR - chars limited to 254
Your Answer or Comment
  |         |  
bold  italic  underline  strike       big  small       superscript  subscript  list  list 
  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 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
Character Count ( Max. - 6000 ) : 324
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 2019 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