Home » Developer & Programmer » Forms » how to count number of items present in a data block
how to count number of items present in a data block [message #520304] Sat, 20 August 2011 12:35 Go to next message
kalpataru
Messages: 72
Registered: January 2010
Location: INDIA
Member
hi all,
my requirement is how to count how many items present in a particular data block in oracle forms 10g.
whether it is a text_item or display_item or list_item etc is there any method to do this.

i have written this when-button pressed but the problem is
how to get the next item name in the block

DECLARE
V_COUNT NUMBER:=0;
V_FIRSTITEM VARCHAR2(100):='';
BEGIN
GO_BLOCK('BLOCK_ITEMCOUNT');
V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', FIRST_ITEM);
LOOP
V_COUNT := V_COUNT + 1;
EXIT WHEN GET_ITEM_PROPERTY(V_FIRSTITEM, NEXTITEM) IS NULL;
--V_FIRSTITEM := GET_BLOCK_PROPERTY('BLOCK_ITEMCOUNT', NEXTITEM);
--V_COUNT := V_COUNT + 1;
END LOOP;
END;
Re: how to count number of items present in a data block [message #520309 is a reply to message #520304] Sat, 20 August 2011 14:48 Go to previous messageGo to next message
cookiemonster
Messages: 13926
Registered: September 2008
Location: Rainy Manchester
Senior Member
You're code gets the next item name, unless for some reason it's not working.
As for getting the item type - you can't. Form builder assumes you already know.
Re: how to count number of items present in a data block [message #520320 is a reply to message #520309] Sun, 21 August 2011 05:56 Go to previous messageGo to next message
kalpataru
Messages: 72
Registered: January 2010
Location: INDIA
Member
i know it is not returning next item name of the block
GET_ITEM_PROPERTY(V_FIRSTITEM, NEXTITEM)

how to solve this issue..

please give me any solution....
Re: how to count number of items present in a data block [message #520321 is a reply to message #520320] Sun, 21 August 2011 06:17 Go to previous message
cookiemonster
Messages: 13926
Registered: September 2008
Location: Rainy Manchester
Senior Member
What is it returning then?
Previous Topic: How to Change LOV language
Next Topic: How to export form data into excel
Goto Forum:
  


Current Time: Fri Jul 26 09:36:09 CDT 2024