RTC error: cannot convert from 'char' to 'byte'

poppins
Member Posts: 647
Hi everyone,
After converting from Classic and trying to run a report in NAV 2009 RTC, I am getting the following error:
The code lines causing the error are the following:
What shall I do???
After converting from Classic and trying to run a report in NAV 2009 RTC, I am getting the following error:
Compilation of assembly 'C:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\assembly\Report60015.dll' failed. This can be caused by differences between binaries in your installation or your database. Ensure that all installation components are consistent and up to date. Error details: c:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Report\Report60015.cs(1192,33) : error CS1502: The best overloaded method match for 'Microsoft.Dynamics.Nav.Runtime.ALSystemString.SetChar(string, int, byte)' has some invalid arguments c:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Report\Report60015.cs(1192,67) : error CS1503: Argument '3': cannot convert from 'char' to 'byte' c:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Report\Report60015.cs(1193,33) : error CS1502: The best overloaded method match for 'Microsoft.Dynamics.Nav.Runtime.ALSystemString.SetChar(string, int, byte)' has some invalid arguments c:\Documents and Settings\All Users\Application Data\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Report\Report60015.cs(1193,67) : error CS1503: Argument '3': cannot convert from 'char' to 'byte'
The code lines causing the error are the following:
var1 = new NavText(1, ALSystemString.SetChar(var1, 0, NavFormatEvaluateHelper.Format(ALCompiler.ToNavValue(1000.1M))[1])); var2 = new NavText(1, ALSystemString.SetChar(var2, 0, NavFormatEvaluateHelper.Format(ALCompiler.ToNavValue(1.1M))[1]));where var1 and var2 are two text variables...
What shall I do???
0
Comments
-
I had same issue before. Looks there is an bug in c\al -> c# converter. Can you please post c/al code - I'll guide you how to fix.
Basically, for some reason it is impossible to assign to char datatype a text constant in c# (which is fine in C\Al).
in my case this was something like :Name DataType Subtype Length SingleQuoteChar Char Name ConstValue SingleQuote ' //SingleQuoteChar := SingleQuote; SingleQuoteChar := 39;
If you assigning an integer to char - c# code compiles just fine.
I was opened a case on MS for this - but still no fix.
It could be same issue in your case, as the error message is exactly the same.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
- 320 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