Showing QR Code in Oracle Reports. Generation of QR Code using PL/SQL and showing it in Oracle Reports.
In this blog, we will be generating a qr code using pl/sql and then the code will be shown in our oracle reports.
Requirement.
Generate a QR code and display it in oracle reports.
Some of the Possible solutions
- Buy and use a third party qr code generators and use their APIs.
- Generate QR code in database using a java
- Use any QR code API to generate QR code using HTTPURITYPE
Solution we are using
Create QR code in database using the awesome PLSQL Package from Zorantica and show the qr code in the report.
How we do it.
Download the PLSQL Package script and create the package in our database.
Create a blob column in our sample invoice table.
Create a trigger to generate qr code to the blob column.
Show blob column in the report.
Let's do it.
1. Download the package
You can download the complete repository from here. This contains the database packages and Apex plugin.
Or you can download database package from below google drive links.
2. Create the package in database. This step is elaborated in another post in this blog. you can check it out here.
3. Create a sample table for our report and create a trigger to generate QR code into the same table. / [Edit /start] Or you can get the qr code from the report query. please check rdf file for the details.[Edit /End]
you can download complete script here.
I shall show you the screenshots important screens.
and the output is
Report rdf (Oracle 11g) for your reference. Qr_report.rdf
Report output pdf for your reference. Qr_report.pdf
Downloads
Detailed post on DB package View Post
GitHub Profile of Zorantica Zorantica GitHub Profile
Complete package from Zorantica Download
DB package Specification Only Package Specification
DB package Body Only Package Body
Sample Table and trigger script Download
Sample Report RDF Qr_report.rdf
Sample Report Output Qr_report.pdf
Update : In report itself you can call the function and can generate qr code dynamically.
This will be recommended option as image files take more space and if you are having a lot of QR codes to be generated, it may take a considerable amount of storage.
This option is added there in the rdf file.
Thanks a million...a million...sharing :)
Happy that it helped.
Helped Lot
Hi Sree,
I am using this code in the rdf file and it's working fine, the QR code data is correct upon scanning from phone . But when I am using this rdf file to create an XML Publisher report , the text in the QR code appear as junk . Do you have any workaround for that ?
I am also facing same issue if you find any solution please post here