Results 1 to 5 of 5
  1. #1
    Join Date
    May 2007
    Posts
    3

    Unanswered: Counting number of records in a form - Oracle9i

    Hello,

    I have a form that contains some data and I would like to count them in a new Item text ... I don't want to use the Item Text's property ... I want to use the SQL statement code to count the records (trigger)... I named the Item Text as Count_Code ...

    So, Can I have your nice help in this (^_^)
    Last edited by meLady; 05-17-07 at 14:48.

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Something like this?
    Code:
    declare
      l_cnt number := 0;
    begin
      go_block('this_block');
      loop
        if :system.last_record = 'TRUE' then
           exit;
        else
           l_cnt := l_cnt + 1;
           next_record;
        end if;
      end loop;
      :another_block.count_records := l_cnt;
    end;
    Please note that I didn't test it, so it might need to be adjusted, but the general idea is here - loop through all records and count them.

  3. #3
    Join Date
    May 2007
    Posts
    3

    Hello

    hello little foot,

    it doesn't work ... what to do????

    Please see the attached file and tell me
    Attached Thumbnails Attached Thumbnails littlefoot.jpg  

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    It seems that there's no 'count_records' item in 'dnrd_dept' block.

  5. #5
    Join Date
    May 2007
    Posts
    3
    can you suggest me what to do ... the idea is to count the existing records in one data block which is 'dnrd_dept', and I created an item text and named it as Count_Code ... where the item text displays the total number of displayed records ... I wanted to use the trigger.

    Can you assist me ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •