dataport

WhiteSpirit
Member Posts: 7
Hello,
I need to make a filter on fields in a dataport, its fields I declared them as variables to be able to export the data in a single line, because I am going to export the data of two tables and I declared only the only one.
Thank you in advance
I need to make a filter on fields in a dataport, its fields I declared them as variables to be able to export the data in a single line, because I am going to export the data of two tables and I declared only the only one.
Thank you in advance
0
Comments
-
in the OnBeforeExport section
MyRecVar2.GET(Field);
MyExportField1 := MyRecVar2.Field1
......
where
MyRecVar2 is of type Record
Field1 is of type MyRecVar2.Field1
Hope this helps0 -
Hello
but I would want that the fields on which I have make the filtes that they are visible by the user so that he can make a filter0 -
Are these 2 Tables linked and if so is it a one to one?
If the answer is yes then you could do the following
Set 3 DataItems
MyRec1
MyRec2
Integer
Don't set the properties for DataItemTableView.
Declare 2 Variables
MyRec3 same as MyRec1
MyRec4 same as MyRec2
In Integer OnPreDataItem
MyRec3.COPYFILTERS(MyRec1);
if MyRec2.COUNT = 0 THEN
CurrDataport.QUIT;
MyRec4.COPYFILTERS(MyRec2);
SETRANGE(Number,1,MyRec3.COUNT);
In OnBeforeExportRecord section
If Number = 1 THEN
MyRec3.FIND('-')
ELSE
MyRec3.NEXT;
add coding to deal with MyRec4 and then fill in the variable fields
of the data you want to export.
Regards
Albert0
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