Dear Appeon Team
I am trying to add Q-R code in Data window (report ) that has been designed in power builder 10.5 version
and I can’t find the correct way to add it .
is there any way to add Q-R code as component in report
please advise
Dear Appeon Team
I am trying to add Q-R code in Data window (report ) that has been designed in power builder 10.5 version
and I can’t find the correct way to add it .
is there any way to add Q-R code as component in report
please advise
You could use a picture control in your datawindow and assign an QR image file to it.
Edit: only works on pb2019 and higher:
I just finished uploading a sample app to encode text to an image on disk and then decode the image back to text: https://community.appeon.com/index.php/qna/q-a/third-party-dll-reading-in-appeon
Hi everyone,
I hope that anyone can help me with this QR code issue, I use a 3rd party component in power builder classic in onder to show
a QR code with a font, the problem is that this is a too old QR code and a simple web QR reader can't read it, only native apps can.
is there any other way to render a simple standard QR? any of you have developed something similar before in PB classic?
any suggestion is welcome.
thanks
Hi Hadi (and everybody),
you don't need any DLL to generate QR.
And, it isn't true that "Appeon doesn't support QR".
Just use HTTPclient object (or even the old iNet object since you are still with PB 10.5) and get the QR picture out of Google API.
For example, a good "PowerBuilder rocks!" 230x230 pixel QR: :-)
http://chart.apis.google.com/chart?cht=qr&chs=230x230&chof=gif&&chl=PowerBuilder rocks!&choe=UTF-8&
Have a look at Google Chart API for list of URL parameters.
Best,
.m
It is very sad, that Appeon doesn't support Barcodes/QR codes as new control/object in DataWindow.
I'm using for years, generating barcode to bitmap file on disk and than function bitmap([path]) in datawindow.
You can choose
for QR code free quricol32.dll library https://github.com/perevoznyk/quricol
or if you want complex barcode solution QR code and other barcodes .... https://zint.github.io/ which is also free.
I voted for barcodes support in every discussion about new features with Appeon, but it looks like no one from important customers use barcodes ....
Would any of the QR Code solutions work within an Appeon website?
Is there an Appeon solution to reading QR code, as well?
Thank you.
John
If the DataWindow object is a text control called t_qrcode:
dw_1.object.t_qrcode.text = ls_qrcode
Dear Brad
i have already installed the font and the encoder that you provide in the post
i appropriate the code in the example you mention
but i really need to know where to use the code because in the data windows that i work on i cant edit the back code of element as text control
please if you can provide me with the pb library of the example you made
so much thanks
On a very slightly similar topic, I have a dll & sample of how to print the US Postal Service address barcodes.
http://www.topwizprogramming.com/freecode_usps4cb.html
I created a full new reply so I could do a proper code sample.
We've been using IDAutomation's universal barcode generator for 10+ years now. They have a version for QR codes as well.
I haven't looked at pricing recently, there are several tiers to choose from
Once installed (font and data encoder), here's sample code to generate the text the font uses to produce a QRCode. Text field (static text or db column) will need to be tall enough to fit the entire QRCode.
oleobject ole_qrcodegen
ole_qrcodegen = create oleobject
long ll_status
ll_status = ole_qrcodegen.ConnectToNewObject("IDAuto.QRCode")
if ll_status = 0 then
string ls_result, ls_str2encode
ls_result = space(8192)
int ProcessTilde, EncodingMode = 0, ECL = 0, Ver = 0
ls_str2encode = "now is the time"
ole_qrcodegen.FontEncode(ls_str2encode, ProcessTilde, EncodingMode, ECL, Ver, ref ls_result)
ole_qrcodegen.disconnectobject()
end if
The text in ls_result can be put into a text field in a DW to show a QR Code, providing it's font is set properly.
Dear Roland
Thanks for your reply , it is not really what i am looking for .
when i use q-code as font it is only convert the type of font
i need to use Q-R code as encoding way so i can use the mobile camera to decode the Q-RCode Square
thanks
You should be able to do it using a special QR code font.
// external function declaration:
Function long ShellExecute( long hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, integer nShowCmd) Library "shell32.dll" alias for "ShellExecuteW"
// pb script
setnull(ls_null)
ll_handle = Handle(Parent)// setnull(ll_handle)
// gnv_app.is_appdir is the path to my application, don't know how important it is, just check. You can also try "ls_null" which I see a lot of people doing:
ShellExecute( ll_handle, 'Open', "your command", ls_null, gnv_app.is_appDir, 0) // last parameter: 1=Normal (last used winState), 3=maximized, 0=hidden????
So here's the latest version of the PB sample app: https://github.com/mjl38/PB_sample_app_QRCodes
And here's the latest version of my Vstudio .net library (and test window form): https://github.com/mjl38/QRCodes
Let me know if you would like me to zip it all and duplicate it on the several posts here.
(For now I'm deleting them, since I have several versions duplicated in 3 different Q&A's).
regards.
best regards