Migrating DB from classic to SQL

clemboclembo Member Posts: 122
I've a strange problem.
Migrating old Nav version to new Sql version (classic client 2009) I have found a problem in a form.
This form is same thath in old version.
This is the code:
Locrec := Rec;

NrRec               := 0;
NrRecToInvoice    := 0;
NrRecInvoiced      := 0;
NrRecordIncomplete := 0;


IF FIND('-') THEN
  REPEAT
    CASE Stato OF
      Stato::"ToInvoice" : NrRecToInvoice := NrRecToInvoice + 1;
      Stato::Invoiced      : NrRecInvoiced   := NrRecInvoiced   + 1;
      Stato::Complete       :
         BEGIN
           NrRec := NrRec +  1;
           Stato := Stato::"ToInvoice";
           MODIFY;
         END;
      ELSE 
        NrRecordIncomplete := NrRecordIncomplete + 1;
    END;  
  UNTIL NEXT = 0
ELSE 
  ERROR('Nessun record è stato selezionato!');

IF (NrRec + NrRecToInvoice) = 0 THEN
  ERROR('No record FOUND to invoice!');

IF CONFIRM(STRSUBSTNO('Found\' +
         '%1 record incomplete\%2 record complete\' +
         '%3 record to invoice\%4 record invoiced\\'+
         'Continue?',NrRecordIncomplete,NrRec,NrRecToInvoice,NrRecInvoiced),TRUE)
THEN
  BEGIN
    Rec := Locrec;
    "State filter" := "State filter"::"To invoice";
    "ApplyFilter";
  END
ELSE 
  ERROR('');

Rec := Locrec;

Strange thing is that record in filter form is 10 but in code it found only four!!!

Comments

Sign In or Register to comment.