Home » Developer & Programmer » Forms » Dynamic List Item problem........... (Oracle 10g, Windows 2000 Server)
icon4.gif  Dynamic List Item problem........... [message #283007] Sun, 25 November 2007 22:49 Go to next message
imtiazmasud
Messages: 49
Registered: May 2005
Location: Bangladesh
Member

Hi all,
I have created a form like this which I have attched the picture of my form with my message...

The problem is ...say I have four different types of bank accounts like DEPOSIT,SSP,GL,INVESTMENT etc.. I have made radio button for each of them and placed them in a radio group(as indicated in my picture attached with it)..

and I have a list Item naming PRODUCT..where the corresponding products will be loaded when I select an account..say if I select DEPOSIT radio button then the corresponding DEPOSIT products will be loaded..if I select SSP then the corresponding SSP products will be loaded..

But the problem is if I select DEPOSIT radio button first time then the product shows but if I select another radio button like SSP and get back select the DEPOSIT button again then it generates and error message like "FRM:-41072: Can not create group group_name",

this means if I select a radio button once then it does not create any problem..If I select it twice then it is creating problem and can not load the products in the list.....

I am also attching my code that is written in WHEN_RADIO_CHANGED
trigger

DECLARE
	
	V_DEPOSIT RECORDGROUP:=NULL;	
	V_SSP RECORDGROUP:=NULL;
	V_INVESTMENT RECORDGROUP:=NULL;
	
	V_DEPOSIT_STATUS NUMBER;
	V_SSP_STATUS NUMBER;
	V_INVESTMENT_STATUS NUMBER;
	
BEGIN
	
	
	IF (:BLOCK3.RG_SOURCE = 'ALL') THEN
		SET_ITEM_PROPERTY('BLOCK3.PRODUCT',ENABLED,PROPERTY_FALSE);
		SET_ITEM_PROPERTY('BLOCK3.GLCODE',ENABLED,PROPERTY_FALSE);
		SET_ITEM_PROPERTY('BLOCK3.GLDESC',ENABLED,PROPERTY_FALSE);
				
	ELSIF (:BLOCK3.RG_SOURCE = 'DEPOSIT') THEN		
		SET_ITEM_PROPERTY('BLOCK3.PRODUCT',ENABLED,PROPERTY_TRUE);
		SET_ITEM_PROPERTY('BLOCK3.GLCODE',ENABLED,PROPERTY_FALSE);
		SET_ITEM_PROPERTY('BLOCK3.GLDESC',ENABLED,PROPERTY_FALSE);
 
		V_DEPOSIT :=CREATE_GROUP_FROM_QUERY('V_DEPOSIT',
		'SELECT ''All''AS ATDESCRIPTION,''All''AS ATDESCRIPTION
		FROM DUAL
		UNION
		SELECT ATDESCRIPTION,ATDESCRIPTION AS ATDESCRIPTION  	
		FROM ACCOUNTTYPE');
				
		IF NOT ID_NULL(V_DEPOSIT) THEN
			V_DEPOSIT_STATUS := POPULATE_GROUP(V_DEPOSIT);
			POPULATE_LIST('BLOCK3.PRODUCT',V_DEPOSIT);
		END IF;
			
	ELSIF (:BLOCK3.RG_SOURCE = 'SSP') THEN		
		SET_ITEM_PROPERTY('BLOCK3.PRODUCT',ENABLED,PROPERTY_TRUE);
		SET_ITEM_PROPERTY('BLOCK3.GLCODE',ENABLED,PROPERTY_FALSE);
		SET_ITEM_PROPERTY('BLOCK3.GLDESC',ENABLED,PROPERTY_FALSE);

  	V_SSP :=CREATE_GROUP_FROM_QUERY('V_SSP',
		'SELECT ''All''AS PRODNAME,''All''AS PRODNAME
		FROM DUAL
		UNION
		SELECT PRODNAME,PRODNAME AS PRODNAME
		FROM SSP_PRODUCT');
	
		IF NOT ID_NULL(V_SSP) THEN
			V_SSP_STATUS := POPULATE_GROUP(V_SSP);
			POPULATE_LIST('BLOCK3.PRODUCT',V_SSP);
		END IF;
				
	ELSIF (:BLOCK3.RG_SOURCE = 'INVESTMENT') THEN		
		SET_ITEM_PROPERTY('BLOCK3.PRODUCT',ENABLED,PROPERTY_TRUE);
		SET_ITEM_PROPERTY('BLOCK3.GLCODE',ENABLED,PROPERTY_FALSE);
		SET_ITEM_PROPERTY('BLOCK3.GLDESC',ENABLED,PROPERTY_FALSE);
			
		V_INVESTMENT :=CREATE_GROUP_FROM_QUERY('V_INVESTMENT',
		'SELECT ''All''AS FPDESCRIPTION,''All''AS FPDESCRIPTION
		FROM DUAL
		UNION
		SELECT FPDESCRIPTION,FPDESCRIPTION
		FROM FINANCIALPRODUCT');
	
		IF NOT ID_NULL(V_INVESTMENT) THEN
			V_INVESTMENT_STATUS := POPULATE_GROUP(V_INVESTMENT);
			POPULATE_LIST('BLOCK3.PRODUCT',V_INVESTMENT);
		END IF;
				
	ELSIF (:BLOCK3.RG_SOURCE = 'GL') THEN
		SET_ITEM_PROPERTY('BLOCK3.PRODUCT',ENABLED,PROPERTY_FALSE);
		SET_ITEM_PROPERTY('BLOCK3.GLCODE',ENABLED,PROPERTY_TRUE);
		SET_ITEM_PROPERTY('BLOCK3.GLDESC',ENABLED,PROPERTY_TRUE);
				
	END IF;
	
	EXCEPTION 
		WHEN OTHERS THEN
		MESSAGE(SQLERRM);
		MESSAGE(SQLERRM);
END;


[EDITED by LF: removed a huge BMP image. Please, read the OraFAQ Forum Guide and attach an acceptable file type]

[Updated on: Sun, 25 November 2007 23:33] by Moderator

Report message to a moderator

Re: Dynamic List Item problem........... [message #283024 is a reply to message #283007] Sun, 25 November 2007 23:41 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:

FRM:-41072: Can not create group group_name

Is this error result of record group's existence? I.e. it might look like "FRM-41072: this record group already exists and I can not create it once again".

If so, you might try one of the following:
a) DELETE_GROUP if it already exists (use FIND_GROUP to check its existence)
b) use POPULATE_GROUP_WITH_QUERY if it already exists (again with the FIND_GROUP).

If the record group doesn't exist yet, you'd create it, of course (the way you are doing it now).
icon14.gif  Re: Dynamic List Item problem........... [message #283039 is a reply to message #283024] Mon, 26 November 2007 00:16 Go to previous message
imtiazmasud
Messages: 49
Registered: May 2005
Location: Bangladesh
Member

Hi man,
The solution is working...thanks a lot man..I was trying to solve it by clearing the list...but I was wrong..thanks a lot once again....imtiazmasud
Previous Topic: How to grant permission to a user
Next Topic: Automatic saving during navigation of master detail record
Goto Forum:
  


Current Time: Wed Dec 07 02:41:22 CST 2016

Total time taken to generate the page: 0.10095 seconds