SETRANGE AND SORT MY RECORD OF DATATYPE CODE

Hello Friend am working on a report and i have a list of account numbers i want to setrange for to sort but am getting a run time error some assistance  please 


GLEntry.SETRANGE("G/L Account No.",'100000','199999');
REPEAT
GLEntry.FIND('-');
UNTIL GLEntry.NEXT <= 0;

 

Parents
No Data
Reply
  • I think You Have to Correct Your Code ...
    i can Imagine that you are trying to SetRange of Dataitem Then you should be writing like below

    GLEntry.SETRANGE("G/L Account No.",'100000','199999');
    IF GLEntry.FINDSET THEN
    REPEAT
    //Code to Loop
    UNTIL GLEntry.NEXT = 0;

    FIND('-') is an Old Syntax of Finding and always returns a set of records,in New NAV RTC
    to get a set of records use FINDSET.
    FINDFIRST -- returns only one record i.e First
    FINDLAST-- returns only one record i.e Last
Children
Related
Recommended