Exporting text file from Nav 2009 as UTF-8 encoded

Aravindh_Navision
Member Posts: 258
Hi Friends,
[For Version: NAV 2009 SP1]
To export UTF-8 encoded text file from Navision the using variable Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Stream
I am trying to export data from NAV 2009 as a text file as UTF-8 encoded using a report. I am getting the output and I need to print in different lines. But it is
displaying continuously.
The code I have done is...
I am getting the output as below.
But I need the output as below in text file.
Can anyone help me solving this?
Thanks, Aarvi.
[For Version: NAV 2009 SP1]
To export UTF-8 encoded text file from Navision the using variable Automation 'Microsoft ActiveX Data Objects 2.8 Library'.Stream
I am trying to export data from NAV 2009 as a text file as UTF-8 encoded using a report. I am getting the output and I need to print in different lines. But it is
displaying continuously.
The code I have done is...
CLEAR(sFileL); CREATE(sFileL); sFileL.Open; sFileL.Charset('UTF-8'); sFileL.WriteText('Texts in line - 1'); sFileL.WriteText('Texts in line - 2'); sFileL.SaveToFile('C:\TextUTF-8.txt');
I am getting the output as below.
01|F|805-9|2011-09-01T12:00:00|03||884.47|0.00|USD|0.08|1025.99||141.52|I|PUE||||P01|0401A|03|BG&0601183W4|BGI GAMING & SYSTEMS, S. DE R.L. DE C.V.|||MEXICO|Blvd. Manuel Ávila Camacho No 32,Piso 12, Oficinas 1203 y 1204,|||Delegación Miguel Hidalgo|Distrito Federal||1100004|CL0000010|PIG930806GL1|PROMOCIONES E INVERSIONES DE GUERRERO, SA PI DE CV|||MEXICO|GUILLERMO GONZALEZ CAMARENA No.600 PISO 9 OFNA. 1,SANTA FE|||DISTRITO FEDERAL|ALVARO OBREGON||01210|05||121015|1|884.47||INSTALLMENT 805-9 OF 12|884.47|884.47|0.0005A|884.47|002|Tasa|0.16|141.5207|002|Tasa|0.16|141.52
But I need the output as below in text file.
01|F|805-9|2011-09-01T12:00:00|03||884.47|0.00|USD|0.08|1025.99||141.52|I|PUE||||P01|04 01A| 03|BG&0601183W4|BGI GAMING & SYSTEMS, S. DE R.L. DE C.V.|||MEXICO|Blvd. Manuel Ávila Camacho No 32,Piso 12, Oficinas 1203 y 1204,|||Delegación Miguel Hidalgo|Distrito Federal||11000 04|CL0000010|PIG930806GL1|PROMOCIONES E INVERSIONES DE GUERRERO, SA PI DE CV|||MEXICO|GUILLERMO GONZALEZ CAMARENA No.600 PISO 9 OFNA. 1,SANTA FE|||DISTRITO FEDERAL|ALVARO OBREGON||01210| 05||121015|1|884.47||INSTALLMENT 805-9 OF 12|884.47|884.47|0.00 05A|884.47|002|Tasa|0.16|141.52 07|002|Tasa|0.16|141.52
Can anyone help me solving this?
Thanks, Aarvi.
0
Comments
-
Hi @Aravindh_Navision ,
Have already tried to insert carriage return and new line between your lines? Usually, chars #10 and #13.Let's go!0 -
Logger, May I know how to do? This is my first attempt, so bit struck up..0
-
Create two variables of type "char", assign them the values and add them at the end of the line:
cr := 13; lf := 10; sFileL.WriteText('Texts in line - 1' + format(cr) + format(lf)); . . .
1 -
Thanks a lot Logger and AK.. It worked.. !!0
-
-
@Aravindh_Navision @logger @AK
Don't bother yourself to handle CrLf manually. Just use thissFileL.WriteText('Texts in line - 1', 1); sFileL.WriteText('Texts in line - 2', 1); sFileL.WriteText('Texts in line - 3');
1
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