INFORMIX 4GL MASTER DETAIL
Posted in 2005
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
I AM HAVING DETAIL SCREEN LIKE THIS NO DATE S NAME RES.DT STATUS 10001 12/12/98 1 SCOTT 12/01/98 y 10002 12/12/98 2 NEILL 12/02/98 Y DATABASE NAME AUSS CONTACT NAME SCOTT WHENEVER I MOVE THE CURSOR IN THE DETAIL UPPER PART IT SHOULD AUOTOMATTICALLLY FETCH THE RECORD AT THE BOTTOM AFTER COMING TO THE ROW I HAVE TO HIT RETURN OR I HAVE TO WRITE THE CODE IN ON KEY AFTER DISPLAY. IS THERE ANY WAY TO WRITE A CODE TO DO AUTO SCROLLING . WHEN I ENTERS ROW IT SHOWD THE CONCERNED DB NAME AND CON NAME
calyanram@hotmail.com wrote: > I AM HAVING DETAIL SCREEN LIKE THIS > NO DATE S NAME RES.DT STATUS > 10001 12/12/98 1 SCOTT 12/01/98 y > 10002 12/12/98 2 NEILL 12/02/98 Y > > DATABASE NAME > AUSS > > CONTACT NAME > SCOTT > > > WHENEVER I MOVE THE CURSOR IN THE DETAIL UPPER PART > IT SHOULD AUOTOMATTICALLLY FETCH THE RECORD AT THE BOTTOM > > AFTER COMING TO THE ROW I HAVE TO HIT RETURN OR I HAVE TO WRITE > THE CODE IN ON KEY AFTER DISPLAY. > > IS THERE ANY WAY TO WRITE A CODE TO DO AUTO SCROLLING . WHEN I ENTERS > ROW IT SHOWD THE CONCERNED DB NAME AND CON NAME Please don't shout. Are you using a DISPLAY ARRAY or an INPUT ARRAY? Which version of I4GL? Which platform? Simply moving the cursor won't automatically fetch and display anything. However, you can use the BEFORE ROW clause of an INPUT ARRAY to look up the data for the database and contact names, and display those. Offhand, I don't recall whether DISPLAY ARRAY has a BEFORE ROW or equivalent clause - I think it does, in which case you can do the same there, too. If you want to get fancy, you can consider treating the database and contact names in a separate screen array (of dimension 1) and using SCROLL UP or SCROLL DOWN to navigate them. This would allow you to establish the data once - before entering the main INPUT ARRAY or DISPLAY ARRAY - and then scroll the secondary array in parallel. The SCROLL statement is one of the least used statements in I4GL. I'm also wondering if there's a problem that it doesn't replace the data that it scrolls out, so it is only really useful in multi-row arrays on the screen. RTM to find out, but I would not use it myself - I would simply display the correct data to the simple screen record (consisting of database name and contact name). -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/