copying filters between two data items in a report

anuragatish
Member Posts: 48
Hi friends,
I have a report that has two data items.
All the filters applied on data item 1 at run time have to be applied as it is on data item 2 also.
i tried using getfilters on first data item. but can't set that on second data item.
regards
Anurag
Technical Consultant
I have a report that has two data items.
All the filters applied on data item 1 at run time have to be applied as it is on data item 2 also.
i tried using getfilters on first data item. but can't set that on second data item.
regards
Anurag
Technical Consultant
0
Comments
-
-
If both Dataitems work on the same table, you can best use
"Table DataItem2".COPYFILTERS("Table DataItem2");
This code you need to put in the OnPreReport-trigger.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
kirki,
the data items are for two different tables. But have most of the fields common
dataitem 1 : Sales Invoice Header
dataitem 2 : Sales Cr. memo Header
i have to apply the filters set on dataitem 1 to dataitem 2.0 -
If they are dependent on each other (indented ) then u can use the same filters
else
if they r independent, then simply use the option (request form ) and force the user to enter the filters and simply apply the same on both the dataitems.
(Dont open each dataitem required filter fileds option to the users. )0 -
thanks buddy,
i have already done that...
looks like there is no other way out...
anyways thanks again...0 -
The other way is to copy the filters field by field in the OnPreReport-trigger.
"Sales Cr.Memo Header".setfilter("No.","Sales Invoice Header".getfilter("No.")); "Sales Cr.Memo Header".setfilter("Sell-to Customer No.","Sales Invoice Header".getfilter("Sell-to Customer No.")); "Sales Cr.Memo Header".setfilter("posting Date","Sales Invoice Header".getfilter("posting Date")); ...
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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