FRM-40733 Error [message #314727] |
Thu, 17 April 2008 11:35  |
hasnainlakhani
Messages: 24 Registered: January 2007
|
Junior Member |
|
|
I get this error. I dont understand why this problem occurs because I use SET_GROUP_CHAR_CELL, SET_GROUP_DATE_CELL and SET_GROUP_NUMBER_CELL Builtins and argument used in this BuiltIns correctly
Please Explain and Guide me what will be the cause of this error and what will be the solution
|
|
|
|
Re: FRM-40733 Error [message #314824 is a reply to message #314727] |
Thu, 17 April 2008 23:18   |
hasnainlakhani
Messages: 24 Registered: January 2007
|
Junior Member |
|
|
declare
rg_id RecordGroup;
gc_id GroupColumn;
rg_col1 VARCHAR2(80) := 'rg_cont'||'.BATCH_NO';
rg_col2 VARCHAR2(80) := 'rg_cont'||'.TRAN_DATE';
rg_col3 VARCHAR2(80) := 'rg_cont'||'.LV4_CODE';
BEGIN
rg_id := Find_Group('rg_cont');
IF Id_Null(rg_id) THEN
rg_id := Create_Group('rg_cont');
gc_id := Add_Group_Column(rg_id, 'BATCH_NO',NUMBER_COLUMN,12); -- batchno
gc_id := Add_Group_Column(rg_id, 'TRAN_DATE', DATE_COLUMN,11); -- tran_dt
gc_id := Add_Group_Column(rg_id, 'LV4_CODE', NUMBER_COLUMN,6); -- lv4_code
Delete_Group_Row(rg_id, ALL_ROWS );
go_block('DET_LEDGER');
first_record;
loop
If :system.last_record <> 'TRUE' then
If :credit_amt > 0 then
Add_Group_Row(rg_id, END_OF_GROUP);
Set_Group_NUMBER_Cell(rg_col1,:system.cursor_record, :DET_LEDGER.BATCH_NO);
Set_Group_DATE_Cell(rg_col2,:system.cursor_record, :DET_LEDGER.TRAN_DATE);
Set_Group_NUMBER_Cell(rg_col3,:system.cursor_record, :DET_LEDGER.LV4_CODE);
next_record;
else
next_record;
end if;
else
if :lc3_code is null and :tran_date is not null then
exit;
elsif :lc3_code is not null and :tran_date is not null then
exit;
end if;
end if;
end loop;
So whats wrong with this code. It works fine when I pass credit amount > 0 in first record but it fails when I pass credit amount > 0 in second record.
Please reply its Urgent.
|
|
|
Re: FRM-40733 Error [message #314828 is a reply to message #314727] |
Thu, 17 April 2008 23:48   |
hasnainlakhani
Messages: 24 Registered: January 2007
|
Junior Member |
|
|
In previous reply in which I mentioned coding If I will use two record groups i-e- If credit > 0 then set_group_number_cell in first record group and if debit > 0 then set_group_number_cell
in second record group then please reply what will be the coding structure.
After adding of Set_Group_number_cell in my previous post I add parameter list and pass record group in report
Add_Parameter(pl_id,'q_1',DATA_PARAMETER,'rg_cont');
and execute report.
I think you guys understand the situation. Please help me in this matter
|
|
|
|
|
Re: FRM-40733 Error [message #316698 is a reply to message #315690] |
Sun, 27 April 2008 20:20  |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
declare
rg_id RecordGroup;
gc_id GroupColumn;
rg_col1 VARCHAR2 (80) := 'rg_cont' || '.BATCH_NO';
rg_col2 VARCHAR2 (80) := 'rg_cont' || '.TRAN_DATE';
rg_col3 VARCHAR2 (80) := 'rg_cont' || '.LV4_CODE';
BEGIN
rg_id := Find_Group ('rg_cont');
IF Id_Null (rg_id) THEN
rg_id := Create_Group ('rg_cont');
gc_id := Add_Group_Column (rg_id, 'BATCH_NO', NUMBER_COLUMN, 12); -- batchno
gc_id := Add_Group_Column (rg_id, 'TRAN_DATE', DATE_COLUMN, 11); -- tran_dt
gc_id := Add_Group_Column (rg_id, 'LV4_CODE', NUMBER_COLUMN, 6); -- lv4_code
Delete_Group_Row (rg_id, ALL_ROWS);
go_block ('DET_LEDGER');
first_record;
loop
If :system.last_record <> 'TRUE' then
If :credit_amt > 0 then
Add_Group_Row (rg_id, END_OF_GROUP);
Set_Group_NUMBER_Cell (rg_col1,
:system.cursor_record,
:DET_LEDGER.BATCH_NO);
Set_Group_DATE_Cell (rg_col2,
:system.cursor_record,
:DET_LEDGER.TRAN_DATE);
Set_Group_NUMBER_Cell (rg_col3,
:system.cursor_record,
:DET_LEDGER.LV4_CODE);
next_record;
else
next_record;
end if;
else
if :lc3_code is null
and :tran_date is not null then
exit;
elsif :lc3_code is not null
and :tran_date is not null then
exit;
end if;
end if;
end loop;
end if;
end;
Next time please post ALL the code. The last 'end if' and 'end' were missing.
Now that I have formatted the code it is easy to see that you have no logic when the group 'rg_cont' already exists.
David
|
|
|