Strange Import Error
MTC
Member Posts: 159
I'm still going through an upgrade process, and for the current database have exported the objects as text, run them through the conv-ml tool and am currently trying to import it back into Navision, fixing the errors on the way when this error appeared about 15 minutes ago and I cannot work it out at all.
Hay un error sintáctico en la importación en la línea 326903 en la posición 25:
OnPostDataItem=BEGIN.
El código AL no tiene la misma indentación que la primera línea
In English that would be something such as:
There is a syntax error in importing line 326903 in position 25
OnPostDataItem=BEGIN.
The AL code does not have the same indentation as the first line.
Has anyone come across this before or got a clue what this means? Looking at the text object file, there doesn't seem to be anything wrong.
Hay un error sintáctico en la importación en la línea 326903 en la posición 25:
OnPostDataItem=BEGIN.
El código AL no tiene la misma indentación que la primera línea
In English that would be something such as:
There is a syntax error in importing line 326903 in position 25
OnPostDataItem=BEGIN.
The AL code does not have the same indentation as the first line.
Has anyone come across this before or got a clue what this means? Looking at the text object file, there doesn't seem to be anything wrong.
0
Comments
-
HI
open this txt file in editor, go to line no 25
this line probably started from the begining of line.
You must insert few space before line.
Check intendation of other trigger and set the same for your error line
Regards0 -
JedrzejT wrote:HI
open this txt file in editor, go to line no 25
this line probably started from the begining of line.
You must insert few space before line.
Check intendation of other trigger and set the same for your error line
Regards
Thanks for the reply, but this is what I do not understand, the error is occuring on line 326903, a custom built report 50077, where would position 25 be?OnPostDataItem=BEGIN //IF "C¢d. Operaci¢n"="C¢d. Operaci¢n"::"Pagar‚ del Ordenante" THEN //BEGIN //CLEAR(TextoSalida); //TextoSalida := // '06' + "C¢d. Opr" + PADSTR(NoCIF,10,' ') + PADSTR(Proveedor."CIF/NIF",12,' ') + // '910' + FORMAT(Efecto."Fecha vencimiento",6,5) {36 en total} + PADSTR('',7,' '); //ArchSalida.WRITE(TextoSalida); //END; CLEAR(TextoSalida); TextoSalida := '0806' + PADSTR(NoCIF,10,' ') + PADSTR('',12,' ') + PADSTR('',3,' ') + CONVERTSTR(FORMAT(Efecto."Remaining Amt. (LCY)",10,Text004),' ','0') + '00' {s¢n els 0's dels decimals} + CONVERTSTR(FORMAT(TotalEfecs,8,Text004),' ','0') + CONVERTSTR(FORMAT(TotalRegtdo + 4 + 1,10,Text004),' ','0') + PADSTR('',6,' ') + PADSTR('',7,' '); ArchSalida.WRITE(TextoSalida); END;
Surely it cannot mean line 25 of the whole file, that reads:
Text005 : TextConst 'ESP="HOY"';
a text constant of CodeUnit10 -
I've found what the problem is.
Indentation in this case does not refer to the number of spaces on the line in question, it refers to the level of logical indentation between {}
In this case, and after solving it, the error also appears in other objects later in the file, the original programmer of the custom objects in this database has been placing comments using {...comment...} inside expressions. This leads to the real error actually being created 100 lines previously than the reported line number, with the real the error being in the code of the previous trigger, yet only after running the conv-ml tool, because it was fine before then.
This strange use of comments inside expressions (100 or so lines before the reported error line)TextoSalida := '06' + "Cód. Opr" + PADSTR(NoCIF,10,' ') + PADSTR(Proveedor."VAT Registration No.",12,' ') + '010' + CONVERTSTR(FORMAT(Efecto."Remaining Amt. (LCY)",10,'<integer>'),' ','0') + '00' {són els 0's dels decimals} + Proveedor2 + ProveCCCNoSucBanco + TotalCod + '1' { variar si es factible } + '9' {variar si es factible} + PADSTR('',2,' ') + ProveCCCDigControl + FORMAT(Efecto."Due Date",6,5) + PADSTR('',1,' ');
has clearly caused the conv-ml tool to become very confused, as it totally destroyed the 4th line shown above, turning it into:'00' {són els 0Text0051' { variar si es factible } +
Obviously leaving an open curly brace with no ending curly brace. The import did not like this for obvious reasons.
I think the moral of this tale is never to use block comments inside expressions.0 -
Thank you for your post.
Actually the problem is not in indentation. It's just a sintax error in any line before the line number that error message shows.Felipe Crespo0 -
fcrespo wrote:Thank you for your post.
Actually the problem is not in indentation. It's just a sintax error in any line before the line number that error message shows.
That is exactly true, what 'fcrespo' wrote. For instance, in my case I was missing an 'END;' statement in the middle of the object. Had to exclude the code piece-by-piece to realize what leads to the issue.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 322 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions