title: how display automated data on the display items in oracle forms
body: <p>I have a code in the ADD Button , for displaying stored data(in the table) on the CONTROL Block 
  the below code is working fine but i am not getting serial_no on the Block</p>
  
  <pre><code>COMMIT_FORM;
  
  Declare 
    Cursor Cur_BILL_DETAILS 
     Is Select code , item_name , qty ,  amount
          From APPS.XXC_BILL_DETAILS 
         Where Bill_no = :bill_no; 
  Begin 
    Go_Block('CONTROL');                 
    Open Cur_BILL_DETAILS; 
    Loop 
      Fetch Cur_BILL_DETAILS Into  :CONTROL.CODE , 
                                   :CONTROL.item_name , 
                                   :CONTROL.qty , 
                                   :CONTROL.amount; 
      Exit When Cur_BILL_DETAILS %Notfound; 
      Next_Record; 
    End Loop; 
    Close Cur_BILL_DETAILS; 
   First_Record; 
  End;
  </code></pre>
  
  <p>And i created the pre-insert on the CONTROL Block(non-database) as below for displaying  Serial_no as</p>
  
  <pre><code>declare
    v_no number;
  Begin
   select xxc_sno.nextval into v_no from dual;
   :CONTROL.SNO:=v_no;
  end;
  </code></pre>
  
  <p>Suppose ,</p>
  
  <p>I am inserting into code, item_name,qty,amount and commited the record , the above ADD Button code worked fine.</p>
  
  <p>The Pre-insert code not generating and displaying the no's as 1,2,3..</p>
  
  <p>Ex:</p>
  
  <pre><code>  Code    item   qty  Amount 
    ----    ----   ---  -----
     A       AA     1   10
     B       BB     1   20
  </code></pre>
  
  <p>and click on the ADD Button, it is saved the inserted 2 records and goes the below(next , control block), display the Stored Records on the Control Block</p>
  
  <pre><code>     Sno     Code    item   qty  Amount 
       ----    ----    ----   ---  -----
        1         A      AA     1   10
        2         B      BB     1   20
  </code></pre>
  
  <p>But the pre-insert trigger is not generating serial no's as 1,2 ,3 etc..(not effecting)</p>
  
  <p>Can you please help me?</p>
  
  <p>Thanks</p>