Consultor Eletrônico



Kbase 17837: Why Does My DOWN Frame Only Display One (1) Record?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Why Does My DOWN Frame Only Display One (1) Record?

If you have defined a frame at the procedure level and the frame
contains a DOWN phrase, the DOWN behavior will only take effect for
code that exists at the procedure level. For code in internal
procedures which references the frame you must include a DOWN WITH
FRAME <x> statement to achieve the same behavior. The reason for this
is that the scope of the frame is larger than the internal procedure
and the automatic DOWN behavior doesn't happen when that is the case.


For example, the following code will display records in each iteration
of the DOWN frame:


DEFINE FRAME X
CUSTOMER.CUST-NUM CUSTOMER.NAME WITH 8 DOWN.

FOR EACH CUSTOMER NO-LOCK:
DISPLAY CUSTOMER.CUST-NUM CUSTOMER.NAME WITH FRAME X.
END.


The following code will only display one iteration in the down frame.


DEFINE FRAME X
CUSTOMER.CUST-NUM CUSTOMER.NAME WITH 8 DOWN.

RUN IP1 IN THIS-PROCEDURE.

PROCEDURE IP1:
FOR EACH CUSTOMER NO-LOCK:
DISPLAY CUSTOMER.CUST-NUM CUSTOMER.NAME WITH FRAME X.
END.
END PROCEDURE.


In order the make second code sample behave like the first you must
add a "DOWN WITH FRAME <x>" statement like the following.


DEFINE FRAME X
CUSTOMER.CUST-NUM CUSTOMER.NAME WITH 8 DOWN.

RUN IP1 IN THIS-PROCEDURE.

PROCEDURE IP1:
FOR EACH CUSTOMER NO-LOCK:
DISPLAY CUSTOMER.CUST-NUM CUSTOMER.NAME WITH FRAME X.
DOWN WITH FRAME X.
END.
END PROCEDURE.

Progress Software Technical Support Note # 17837