Recent

Author Topic: How can I print a QR from lazreport  (Read 2112 times)

mandy

  • Newbie
  • Posts: 3
How can I print a QR from lazreport
« on: February 23, 2023, 09:47:00 pm »
I want to make a report generating QR codes for mass printing.
But in LazReport it is only possible with the barcode

paweld

  • Hero Member
  • *****
  • Posts: 996
Re: How can I print a QR from lazreport
« Reply #1 on: February 23, 2023, 10:12:55 pm »
With LazBarCodes you need to prepare a bitmap with a QR code, and then pass on to the report. 
Tomorrow I will try to prepare an example
Best regards / Pozdrawiam
paweld

dsiders

  • Hero Member
  • *****
  • Posts: 1080
Re: How can I print a QR from lazreport
« Reply #2 on: February 23, 2023, 10:18:35 pm »
I want to make a report generating QR codes for mass printing.
But in LazReport it is only possible with the barcode

Use the forum search. There are previous discussions on the topic, and an attached modification to allow lazreport to use QRCode.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

mandy

  • Newbie
  • Posts: 3
Re: How can I print a QR from lazreport
« Reply #3 on: February 24, 2023, 03:39:00 pm »
This is the code I use to generate the bitmap, I'm not sure if it's correct
Code: Pascal  [Select][+][-]
  1. BarcodeQR1.Text:='Cod: '+Activos.FieldValues['CODACT']+'|Grupo: '+Activos.FieldValues['TIPOACT']+'|Tipo: '+Activos.FieldValues['TIPOACT']+'|Marca: '+Activos.FieldValues['MARCA']+'|Modelo: '+Activos.FieldValues['MODELO']+'|Serie: '+Activos.FieldValues['SERIE']+'|Descripción: '+Activos.FieldValues['DESTIPOACT']+'|Ubicación General: '+Activos.FieldValues['ESTADO'];
  2. BarcodeQR1.Generate;
  3. BarcodeQR1.SaveToFile('qrcode.bmp', nil, 300, 300);

paweld

  • Hero Member
  • *****
  • Posts: 996
Re: How can I print a QR from lazreport
« Reply #4 on: February 24, 2023, 09:26:09 pm »
Sample in attachment
« Last Edit: February 24, 2023, 09:29:09 pm by paweld »
Best regards / Pozdrawiam
paweld

 

TinyPortal © 2005-2018