Report on to a text file

Prem
Member Posts: 34
Hi All
I am trying to write a report on to a text file but unfortunately i am getting only the last line and only one line in that file how can i have multiple lines on the text file
Regard's
Prem
I am trying to write a report on to a text file but unfortunately i am getting only the last line and only one line in that file how can i have multiple lines on the text file
Regard's
Prem
0
Comments
-
Can you post some C/AL code?No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
This code is on onpresection
fi.OPEN('C:\hex.txt');
line:='1INHSBC'+COPYSTR(accno,1,3)+COPYSTR(accno,4,6)+COPYSTR(accno,10,3)+fullname;
fi.WRITE(line);
line:='';0 -
This code
fi.OPEN('C:\hex.txt');
should be in the OnPreSection of the Header.
This code
line:='1INHSBC'+COPYSTR(accno,1,3)+COPYSTR(accno,4,6)+COPYSTR(accno,10,3)+fullname;
fi.WRITE(line);
line:='';
should be in the OnPreSection of the Body.
If there is no printing involved in this report, you better put your code in the OnPreDataItem and OnAfterGetRecord triggers of the Dataitems. Then you should use the report property ProcessingOnly = yes.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Still its not wotking Luc !!!!0
-
Is there a way to add a new line character :roll:0
-
Be sure to add fi.TEXTMODE(TRUE) before your fi.OPEN statement.
This is from the on-line help:
If f.TEXTMODE is set to TRUE and Value is an integer, the system formats the integer into text and writes the result, followed by a new line character.
If Value is a record, the system separates each field with a tab character.
If f.TEXTMODE is FALSE and Value is an integer, the system writes the integer as an integer which is four bytes long.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Thanks Luc Seems to be Working ........
Let me do some R&D on this0 -
Instead of writing all the wariables into a string variable and transering into the text file , Cant we write the fields directly... when i try that its again the same.0
-
Have a look at Dataports. They are used for exporting data to a text-file, or importing data.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
No i am not straight away writing those fields ... basically i am writing infos on to a text file and that has to be in a format ,i have to convert each and every values in filed's.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