Don't export a Dataitem in a Dataport

marcolde
Member Posts: 12
Hi,
i've create a dataport with four dataitems. one dataitem i only you use to create a total for the next dataitem. so this dataitem do not have any dataportfields, but when i use the export it creates a empty line. how can i change the settings that i don't have the empty line.
thanks
i've create a dataport with four dataitems. one dataitem i only you use to create a total for the next dataitem. so this dataitem do not have any dataportfields, but when i use the export it creates a empty line. how can i change the settings that i don't have the empty line.
thanks
0
Comments
-
Set property DataItemSeparator of the dataport to <None>.
Just type these 6 characters so it spells <None>.
If you still want the other data-items to generate a newline, then you could add code for that in OnPreDataItem:CurrFile.WRITE('');
Keep It Simple and Stupid (KISS), but never oversimplify.0 -
Just remembered ... CurrFile.WRITE('') only generates a newline when TEXTMODE is true.Keep It Simple and Stupid (KISS), but never oversimplify.0
-
Hi,
thank you for your reply, but what means the Textmode is true?
thanks
Marco0 -
TEXTMODE (from the online help):
Specifies the mode in which the file will be opened when File.OPEN is called.
If SetTextmode is true, the file will be opened as an ASCII file. If SetTextmode is false, the file will be opened as a binary file.
ASCII file (the easiest way)
Put this in the OnInitDataport:CurrFile.TEXTMODE(TRUE);
And in the OnPreDataItem, not in the first data-item and not in the one without output:CurrFile.WRITE(''); CurrFile.WRITE('');
De default value of DataItemSeparator is <NewLine><NewLine>.
You don't want this in every data-item, so you program it in the ones you need.
Binary file
If you would use a binary file (TEXTMODE=false), then you could create the newlines in a different way.
Define Globals:
CR Char
LF Char
OnPreDataItem:CR := 13; LF := 10; CurrFile.WRITE(CR); CurrFile.WRITE(LF); CurrFile.WRITE(CR); CurrFile.WRITE(LF);
Keep It Simple and Stupid (KISS), but never oversimplify.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