QR Codes in reports

Graham Stevens graham.stevens at gmail.com
Wed Aug 17 19:14:16 UTC 2022

Hi Andy,

Not sure if this helps but in the conference app the letters we send to delegates include a QR code to access the online session booking form.  To generate it, running on a Mac , I installed qrencode with Homebrew and then in the picture field on the report the $print method looks like this: (The whole library is available on GitHub and this method is available here: https://github.com/PISL/omnis-conference/blob/master/src/CONFERENCE/thisAppOther/reports/rpDelegateWelcome/objs/picQR/%24print.omh#L1)

Calculate lcFileName as con(ilData.DG_SEQ,'.png')
Calculate lcFilePath as con('/tmp/',lcFileName)
Calculate lcURL as con(irSessionURL.RFO_CHAR,'?id=',ilData.DG_SEQ,'&name=',replaceall(ilData.PSN_SURNAME,' ','%20'))

;  run the shell command to invoke qrencode
Calculate lcScript as con("/opt/local/bin/qrencode -l M -o ",lcFilePath," '",lcURL,"'")
Do $runapplescript(con('do shell script "',lcScript,'"'),lcResponse,lcErrorText) Returns lnExecuteErrorCode
ReadBinFile (con('/tmp/',lcFileName),lbinImage)      ;; HFS to posix

Do pictconvfrom('PNG',lbinImage) Returns ipQR
Do $cinst.$objs.picQR.$rawpictformat.$assign(pictformat(ipQR))

Calculate pData as ipQR
Do default

Best regards,

> On 17 Aug 2022, at 19:53, Graham Stevens <graham.stevens at gmail.com> wrote:
> Hi folks
> Has anyone added QR codes to an Omnis report ?
> I know I can do this in python - just wondering if there is any smart way to do this directly within an Omnis report ??
> Andy Hilton
> Totally Brilliant Software Inc
> Phone (US) : (863) 409 4870
> Phone (UK) : 0207 193 8582
> Web : www.totallybrilliant.com
> Helpdesk : http://totallybrilliant.kayako.com
> Email : andyh at totallybrilliant.com

More information about the omnisdev-en mailing list