Dataport DataItemSeparator

Peter_Pardon
Member Posts: 16
Hello,
I have a problem regarding dataports
Every day i export all invoices and credit notes to send them to a factoring company
I now have a dataport With 4 dataitems
1: integer -> 1 header record
2: Sales Invoice Header -> all invoices of that day
3: Sales Cr.Memo Header -> all credit notes of that day
4: integer -> 1 footer record with control numbers
the dataitemseperator is <NewLine>
This works fine except if there are no credit notes that day, in that case navision will leave a blank line between dataitem 2 and 4. And my file is rejected by the factoring company.
Is there a simpel to make the system not a newline when there is a dataitem with no records within the filter?
As i look now the only alternatif that i have is to put the Sales Invoice Header and the Sales Cr.Memo Header in a temporary table and export those values.
If there is anybody with a better alternative?
thanks in advance?
Greetings Peter
I have a problem regarding dataports
Every day i export all invoices and credit notes to send them to a factoring company
I now have a dataport With 4 dataitems
1: integer -> 1 header record
2: Sales Invoice Header -> all invoices of that day
3: Sales Cr.Memo Header -> all credit notes of that day
4: integer -> 1 footer record with control numbers
the dataitemseperator is <NewLine>
This works fine except if there are no credit notes that day, in that case navision will leave a blank line between dataitem 2 and 4. And my file is rejected by the factoring company.
Is there a simpel to make the system not a newline when there is a dataitem with no records within the filter?
As i look now the only alternatif that i have is to put the Sales Invoice Header and the Sales Cr.Memo Header in a temporary table and export those values.
If there is anybody with a better alternative?
thanks in advance?
Greetings Peter
0
Comments
-
Hi,
You could try something like that in the "OnPreDataItem" trigger:IF COUNT = 0 THEN CurrDataport.BREAK;
-- Alejandro --0 -
many thanks
It worked0
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