DEF VAR i AS INT INIT 0.
DEF VAR j AS INT INIT 0.
DEFINE FRAME fCust
Customer.CustNum LABEL "Cust#"
Customer.Name
Customer.City
SKIP(1).
DEFINE FRAME fInvo
Invoice.Invoicenum LABEL "Invo#"
SKIP(1).
forCust:
FOR EACH Customer NO-LOCK WITH FRAME fCust
:
i = i + 1.
forInv:
FOR EACH Invoice
WHERE Invoice.CustNum = Customer.CustNum
NO-LOCK WITH FRAME fInvo
:
j = j + 1.
END.
END.
MESSAGE "i: " i "j: "j.
Now i do this:
DEF VAR i AS INT INIT 0.
DEF VAR j AS INT INIT 0.
DEFINE FRAME fCust
Customer.CustNum LABEL "Cust#" BGCOLOR 5
Customer.Name BGCOLOR 6
Customer.City BGCOLOR 7 SKIP(1).
DEFINE FRAME fInvo
Invoice.Invoicenum LABEL "Invo#" BGCOLOR 2
SKIP(1).
forCust:
FOR EACH Customer NO-LOCK
:
i = i + 1.
j = 0.
DISPLAY Customer.CustNum Customer.Name Customer.City WITH FRAME fCust.
MESSAGE "i: " i "j: "j.
forInv:
FOR EACH Invoice
WHERE Invoice.CustNum = Customer.CustNum
NO-LOCK BREAK BY Customer.CustNum
:
j = j + 1.
DISPLAY Invoice.Invoicenum (COUNT BY Customer.CustNum) WITH FRAME fInvo NO-BOX STREAM-IO.
MESSAGE "i: " i "j: "j.
END.
END.
So, what's the question?
Eehehe, the question is:
"is this the correct sintax to define 2 frames and use these to print on screen in 2 different area"?!
You other users of PSDN what use for print quckly on screen? The FORM statemant?
What is the difference between FORM and FRAME statemant?
I don't have experience and i move blind on manual, and manual, and manual, and handbook and help online, but this don't keep me axperience in this Progress's World.
Ahh i forgot, the code posted up don't work correctly. No syntax error, but don't work.
Is correct the syntax method used before?!
I've one pseudo guideline that is:
I'm still a little fuzzy about the question, but I will say that I tend to define FORMs or FRAMEs at the top of the code rather than in-line, along with all variable definitions, buffers, temp-tables, etc. Then the actual display code only has to say WITH FRAME X and all the details about positioning, borders, size, etc. are provided in the definition.
OK perfect for describe a good method, but in my slide a see too
http://img246.imageshack.us/img246/5853/46jg4.jpg
,that NO-BOX and STREAM-IO give back more readable the output on my screen.
Deprecated mode in my deprecated slide?
Other]
But what happen if i use the frame with a field in more? It come display as default system mode?
Someone can post some example for FORM use?
Is alternative to DISPLAY?
I try to define frame, and then use the form with the frame as i do with the display with frame.
Code:
http://img253.imageshack.us/img253/4349/26505370bz0.png
Result:
http://img299.imageshack.us/img299/5512/35508091tv9.png
With this code ... noth-ing!
http://img299.imageshack.us/img299/2279/88504064fg5.png
So i don't understan in what case use one or the other one. ;(
Message was edited by:
matrixbob
Experiment of auto-update title with counter "i": failed. :(
DEF VAR vcStringa AS CHAR INIT "Questa è la stringa di inizializzazione" FORMAT "X(40)" NO-UNDO.
DEF VAR vcFrameStampa AS CHAR NO-UNDO.
DEF VAR vcFrameTitolo AS CHAR NO-UNDO.
DEF VAR i AS INT NO-UNDO.
DO i=0 TO 5
:
vcFrameStampa = SUBSTITUTE ("fStampa&1", i).
vcFrameTitolo = SUBSTITUTE ("Procedura di stampa &1", i).
DEFINE FRAME vcFrameStampa WITH CENTERED ROW 3 TITLE vcFrameTitolo USE-TEXT 5 DOWN.
DISPLAY vcStringa LABEL "Stampa"
i LABEL "indice"
vcFrameTitolo FORMAT "X(40)"
vcFrameStampa FORMAT "X(40)"
WITH FRAME vcFrameStampa.
PAUSE.
END.
"failed" doesn't communicate to us what you expected and how what you got was different. Compile error? Run time error? Unexpected result?