Home » Developer & Programmer » Forms » FRM-41042: Cannot create Group REC - Error (windows)
FRM-41042: Cannot create Group REC - Error [message #366346] Fri, 12 December 2008 22:29 Go to next message
akrish
Messages: 2
Registered: December 2008
Junior Member
Hi,

Based on radio-button option, I am populating 2 tables records into list item thru create_query in On-Mouse-Click of Radio-group button trigger.
Example.
If rdbtn1, then populate emp data to list item,
if rdbtn2, then populate dept data to list item

Again if I select rdbtn1, then it showing "FRM-41042: Cannot create Group REC" - Error. Please assist me. Advance thanks.

Here is my code..

DECLARE
REC RECORDGROUP;
REC1 RECORDGROUP;
STATUS NUMBER;
BEGIN
if :cntrl.RADIO_GROUP17 = 10 then
clear_list('list5');
REC :=CREATE_GROUP_FROM_QUERY('REC','select to_char(empno),ename from emp1');

IF NOT ID_NULL(REC ) THEN
STATUS:=POPULATE_GROUP(REC);
POPULATE_LIST('list5',REC);
END IF;
else
clear_list('list5');
REC1 :=CREATE_GROUP_FROM_QUERY('REC1','select to_char(dept_id),dept_name from dept1');

IF NOT ID_NULL(REC1 ) THEN
STATUS:=POPULATE_GROUP(REC1);
POPULATE_LIST('list5',REC1);
END IF;
end if;
END;

[Updated on: Sat, 13 December 2008 01:33]

Report message to a moderator

Re: FRM-41042: Cannot create Group REC - Error [message #375754 is a reply to message #366346] Sun, 14 December 2008 02:31 Go to previous messageGo to next message
tarekfathi2003
Messages: 23
Registered: August 2008
Location: kw
Junior Member
I think your code should be like this

DECLARE
   rec      recordgroup;
   rec1     recordgroup;
   status   NUMBER;
BEGIN
   IF :cntrl.radio_group17 = 10   THEN
      CLEAR_LIST ('list5');
      rec := FIND_GROUP ('REC');

      IF NOT ID_NULL (rec)      THEN
         DELETE_GROUP ('REC');
      END IF;
      rec := CREATE_GROUP_FROM_QUERY ('REC','select to_char(empno),ename from emp1');
      status := POPULATE_GROUP (rec);
      POPULATE_LIST ('list5', rec);
   ELSE
      CLEAR_LIST ('list5');
      rec1 := FIND_GROUP ('REC1');

      IF NOT ID_NULL (rec1)      THEN
         DELETE_GROUP ('REC1');
      END IF;

      rec1 := CREATE_GROUP_FROM_QUERY('REC1', 'select to_char(dept_id),dept_name from dept1' );
      status := POPULATE_GROUP (rec1);
      POPULATE_LIST ('list5', rec1);
   END IF;
END;



Re: FRM-41042: Cannot create Group REC - Error [message #375814 is a reply to message #375754] Mon, 15 December 2008 00:40 Go to previous message
akrish
Messages: 2
Registered: December 2008
Junior Member
Thank you very much . it's working fine
Previous Topic: Check for duplicate value in grid for non database block
Next Topic: import data from excel and process via oracle forms 10g
Goto Forum:
  


Current Time: Thu Dec 08 02:15:39 CST 2016

Total time taken to generate the page: 0.10704 seconds