Forum Discussion
ISO20022-compatible QR Code
I want to generate an ISO20022-compatible QR Code in Word using data from an Access DB query via a MERGEBARCODE field. The data must contain CR/LF, but the MERGEBARCODE field seems to strip out CR/LF when I read the QR Code with a QR reader. The CR/LF are visible in the Access query. Would you know why this happens, and if there is a way of fixing it?
- George HepworthSteel Contributor
Just an educated guess here.
"The CR/LF are visible ..."
When you say they are visible, does that mean you can see the ASCII codes themselves, or just the effect of the line breaks in the displayed text?
My guess would be the latter, and that you might need to identify more precisely what those line break ASCII codes are so you can ensure the proper codes are used.
- landste1Copper Contributor
George HepworthYes, the effect of the line breaks is visible in the data sheet view of the query, e g
SPC
0200
1
CH65 3000 0001 4000 1784 9
S
GGG Basel Kurse / Geschäftsführung Basel
Eisengasse
5
4051
Basel
CH50.00
CHF
S
Axxxxx Pxxxx
Xxxxxxstr. 274153
Rxxxxx
CH
QRR
267275801EPD
When I read the QR Code generated by the MERGEBARCODE field with a QR Reader, it shows the data all in one line, without the line breaks. However, when I copy that data and paste it into Word or Notepad, the line breaks appear again as they should. It is very strange.
The line breaks are important, because in ISO20022 they signal the end of a data field, and have to be present even if the data field is empty. When I test the QR code on the ISO20022 testing platform, it gets rejected because the number of fields is incorrect (presumably, it only sees one field when there should be about 30).
I generated the line breaks in the Access query using "Chr(13) & Chr(10)" (and also "Chr$(13) & Chr$(10)", but it made no difference). From the documentation, that seems to be the standard way of inserting line breaks. Do you have any other way?
- George HepworthSteel Contributor
landste1 I think the problem is that the characters which create the line breaks are not visible to you but they are there. It may be that Access doesn't recognize whatever those line break characters are and therefore doesn't render them appropriately.
What I would do is try to parse the text string and figure out what they are.