QR Code Creator
QR Code is defines that a machine-readable code consisting of an array of black and white squares, typically used for storing URLs or other information for reading by the camera on a smartphone.
The static content renders the content entered in the “Source” attribute as HTML so we can display the same in the application. Since it is similar to a white canvas, we can build a customized solution using this functionality of static content. Below is a use case for Static Content:
Use case for Static Content-QR Code:
The QR CODE Will be generated based on the inputs given by the user by using java scripts.
We have to create two static regions and one Interactive or classic Report.
Region 1: Display Region
<div id=”qrdiv”> <canvas id=”qrcanv”></div>
Region 2: Download Region
<a id=”download” download=”QRCODE.jpg” href=”“ onclick=”download_img(this);”>Download</a>
Region 3 : Interactive Report
select QRCODE_ID, QRCODE_VALUE, FILENAME, MIMETYPE (dbms_lob.getlength(FILECONTENT)) download from DOY_FLEXR_QR_CODETBL order by 1 desc
Note: “DOY_FLEXR_QR_CODETBL” is an custom Table & user can able to use their own Tables.
We need to create two page items as Text field(Input) and Hidden Item.
We need to create a Two dynamic actions as follows
Dynamic Action 1:
- On Event: Page Load
Dynamic Action 2:
- Event : Change of Input Item
- Execute Plsql Code :
Declare Lv_Qrcode_Id Number; V_Result Blob; V_Clob Clob := Replace(:P70_Image_Base64,'data:image/png;base64,',''); Begin V_Result := Base64decode(V_Clob); Select Nvl(Max(Qrcode_Id),0) + 1 Into Lv_Qrcode_Id From Doy_Flexr_Qr_Codetbl; Begin Insert Into Doy_Flexr_Qr_Codetbl ( Qrcode_Id,Qrcode_Value,Filename,Mimetype,Filecontent,Created_By,Created_Date) Values ( Lv_Qrcode_Id,:P70_Qrinput,'QRCODE'|| Lv_Qrcode_Id|| '.jpeg','image/jpeg',V_Result, :App_User,Sysdate); End; End;
- Refresh Classic/IR Report
QR Code is abbreviated as “Quick Response code”.It is most popular due to its readability and its greater storage capacity compared to other standard codes By following the above steps,We can able to create QR Code Values based on user inputs.