Hello All,
I need to print Item labels for each item in delivery, this label has a QR code for the item's serial no.
- Item label info is entered on page 1 and inserted into a table on the same page using the insert process. (generating item id for each item)
- In the same process, I am generating a QRcode BLOB for the item inserted and storing it in another table that has all the blob related info (This table has an item id column to link the blob file to its specific item)
- I've created an application_item named item_id and an application_process to convert the blob to a PNG image. (blob will be queried from blob details table based on the item id provided in the link)
- Now on the next page, I have PLSQL Dynamic content in which I want to create an item label for each item in delivery with its own QR code
- For that, I have a loop on the item details table and inside the loop, I am creating an HTML table to display item related info along with the QRcode (one table for one label)
- To display the QR Code, in the image src I've used the URL to call the Application process, passing the item id.
Now the problem is if my delivery has 3 items the QR code is generated for all three items and is inserted in the blob table correctly. But while displaying it displays the QRcode of the last item for the remaining two items as well.
I've followed the steps from this article except for the PLSQL Dynamic Content part.
Display BLOB Contents (PDF, Images) into a Region in Oracle Apex Page
https://joelkallman.blogspot.com/2014/03/yet-another-post-how-to-link-to.html
Here is how my PLSQL Dynamic Content looks
declare
cnt number;
blb blob;
ln number;
url_f varchar2(4000);-- := 'f?p=&APP_ID.:0:&SESSION.:APPLICATION_PROCESS=GETIMAGE:NO::ITEM_LABEL_ID_QR,1001';
begin
for ii in 1..3 loop
cnt := ii*111111;
blb := apps.xxfm_MAKE_QR.qr_bin(cnt) ;
ln := to_number(to_char(sysdate,'DDMMYYHHMISS'));
insert into xx204_blob_test(QR_ID, QR_CODE,MIME_TYPE,FILE_NAME,DATE_CREATED,ITEM_LABEL_ID) values (ii,blb,'PNG', 'FN'||cnt, sysdate, ln);
commit;
apex_util.set_session_state('ITEM_LABEL_ID_QR',ln);
url_f := 'f?p=&APP_ID.:0:&SESSION.:APPLICATION_PROCESS=GETIMAGE:NO:ITEM_LABEL_ID_QR,&ITEM_LABEL_ID_QR';
htp.p('
<html>
<body>
<table>
<tbody>
<tr>
<td style="width: 100%; padding:1%;" colspan="3" class="qr">
<img style=" width:250px; height:250px " src="'||url_f||'" alt="barcode"/></td>
</tr>
</tbody>
</table>
</body>
</html>');
end loop;
end;
Shashank
Resolved it, I was passing URL Parameters incorrectly.