Problem in displaying multiple records [message #313498] |
Sun, 13 April 2008 03:51  |
dillango
Messages: 145 Registered: January 2008
|
Senior Member |
|
|
Dear All,
I have the base table having just three following columns
Employee number
date of vacation
Description
In the form while entering the new record, I want to display all his previous transaction history
available in the same table.
I have created one non basetable block with tabular column (10 records) and displayed in the same canvass (with
base table block).
In Employeenumber column I have written the following code in "key_next_item" trigger.
If :empno is not null then
declare
cursor c1 is select empno,vacationdate,descrption from vacationtable where empno = :empno;
begin
go_block('CONBLOCK') -- Non base table block
first_record;
for s1 in c1 loop
:conblock.empno = s1.empno;
:conblock.vacationdate = s1.vacationdate;
:conblock.descrption = s1.descrption;
next_record;
end loop;
end;
end if;
Now the problem is, I have 5 records in the table but it displaying only the last record.
Actually, cursor fetching all the five records but it displaying in the first row only (just overwriting the same row).
Can you please suggest where exactly the problem I made.
Ilango
|
|
|
|
Re: Problem in displaying multiple records [message #313543 is a reply to message #313527] |
Sun, 13 April 2008 09:42   |
dillango
Messages: 145 Registered: January 2008
|
Senior Member |
|
|
Thank you Mr.Littlefoot,
However, In order to avoid the confusion to the reader, I mentioned just three columns. Actualy I have plenty of columns in the table and using form type to capture all those informations. Meanwhile, I would like to display few key columns (from the same table) in tabular form and if the user wishes to check the detailed information, he can double click the mouse from a required row.
All my forms have my own pushbuttons for Add, edit, view, first,next,prior etc.. I never used the default type.
One thing I really did not understand is, When I go to a particular block and if I mentioned anything as "Next_record" it should applicable only that block right? actually it is effecting the other block also (base table block).
Even having developed so many forms, I really did not understand this.
Ilango
|
|
|
|
|
|
|
|