I have a problem, my code is: IF recCustomer."No." <> '' THEN BEGIN SalesLine.SETFILTER("No.",Item."No."); IF SalesLine.FIND('-') THEN REPEAT SalesHeader.GET(SalesLine."Document Type",SalesLine."Document No."); IF SalesHeader."Sell-to Customer No."=recCustomer."No." THEN BEGIN ClienteTrovato:=TRUE; EXIT; END UNTIL SalesLine.NEXT=0;
but EXIT is WRONG because I want exit only from REPEAT…UNTIL. There is another way? THANKS
Hello, UNTIL BODY1 IF CONDITION1=TRUE THEN BEGIN BODY2 END; repeat(CONDITION1=TRUE)AND(CONDITION2=TRUE); Is it inconvenient? BR Anthony
Hi Clembo, instead of using exit why don’t you put the test in the until. repeat … … if salesheader.“sell-To Customer No” = recCustomer.“No” then ClienteTrovato := true; until (ClienteTrovato) or (Salesline.next = 0); Wendy
Hello all, i’ve tried to do it (CurrReport.BREAK) just now and it said “The called function can only be called from a DataItem trigger”. Maybe tis possible there but not in the ordinal functions. Simple use of “BREAK” call gave me the syntax error. N.F. 3.10/3.60 BR, Anthony
Try this mod:
quote:
Originally posted by clembo
IF recCustomer."No." <> '' THEN BEGIN SalesLine.SETFILTER("No.",Item."No."); IF SalesLine.FIND('-') THEN REPEAT SalesHeader.GET(SalesLine."Document Type",SalesLine."Document No."); IF SalesHeader."Sell-to Customer No."=recCustomer."No." THEN BEGIN ClienteTrovato:=TRUE; ~~EXIT;~~ **SalesLine.Find('+')** END UNTIL SalesLine.NEXT=0;