Wednesday, February 2, 2022

How to print Bulk PDF from oracle forms

How to print Bulk PDF from oracle forms

 Step 1:

As an example, in the first step, I manually generated the button Bulk Print in the block to build a button with any name in my instance, I built a button named Bulk Print.
How to print Bulk PDF from oracle forms

Step 2:

The second step is to build the WHEN-BUTTON-PRESSED trigger. To create the trigger window, use the shortkey F11 or right-click the button and choose smarttrigger from the context menu. As well as the keyword search WHEN-BUTTON-PRESSED is pressed and clicking on the OK button.
How to print Bulk PDF from oracle forms

Step 3:

When the WHEN-BUTTON-PRESSED trigger is triggered. Copy and paste the code that I have provided below.

 

declare

pl_id ParamList;

vr_filename varchar2(500);

cursor c1 is

select e.empno , e.ename , e.job , e.mgr , e.hiredate , e.sal , e.comm , e.deptno from emp e;

BEGIN

FOR REC IN c1 LOOP

               

                                                pl_id := Get_Parameter_List('tmpdata');

                                  IF NOT Id_Null(pl_id) THEN

                                    Destroy_Parameter_List( pl_id );

                                  END IF;

                                  pl_id := Create_Parameter_List('tmpdata');

                                 

                                  Add_Parameter(pl_id,'P_EMPNO', TEXT_PARAMETER, rec.empno);

                                                Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'FILE');

                                                Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'PDF');

                                               

                                                vr_filename := 'E:\Bulk_PDF\'||rec.empno||' '||rec.ename||'.PDF';

                                               

                                                Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,vr_filename);

                                  Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');

                                  Run_Product(REPORTS, 'E:\number into Words.RDF', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);

 END LOOP;

END;

How to print Bulk PDF from oracle forms

Step 4:

Now run the form with the help of Ctrl + R or go to the object navigator and press the and press this button to run the form.

 

Output:




If you have any problem so download the file to click on "Download".

I hope it's helpful for you. If you have any queries, don't hesitate to contact me.

Name : Muhammad Sahal Qasim
E-mail : s.m.sahal789@gmail.com
Thank you.

0 comments:

Post a Comment

If you have any doubts, please let me know. I will help you.