Filters problem in Report
jpnav
Member Posts: 11
Hi Experts!!
Developed a report with 3 data items for export to excel functionality. Tables are
1.contacts
2. address
3. email
export related data is inserting to a temp table from address data item, data printing from contact table.
filters every thing working perfectly.
Now I added one more data item Childinfo to that report.
4. Childinfo
I am facing a problem with filters not working.
I added code for childinfo related printing, its printing properly, but related to filters where should I add code, pls provide me sample code, so that i can solve this issue.
Thanks for your help in advance.
Jp
Developed a report with 3 data items for export to excel functionality. Tables are
1.contacts
2. address
3. email
export related data is inserting to a temp table from address data item, data printing from contact table.
filters every thing working perfectly.
Now I added one more data item Childinfo to that report.
4. Childinfo
I am facing a problem with filters not working.
I added code for childinfo related printing, its printing properly, but related to filters where should I add code, pls provide me sample code, so that i can solve this issue.
Thanks for your help in advance.
Jp
0
Comments
-
If you want to add some filtering through code, use the OnPreDataItem
If you want to add filtering based on parent dataitem, check the Properties of the dataitem and set the linking...0 -
Hi Kamil
Thanks a Lot for your reply. !!
I want to add filters through code for childinfo table.
I added code on OnPreDataItem of Contact, Mail, E-Mail as follows:
Child.SETRANGE(Child."Contact No.",ChildInfo."Contact No.");
Child.SETFILTER(Child."Contact No.","Contact No.");
If this code is not suffient then what could be the code or any sample code for this type of fuctionality.
other 2 data items filters working fine, newly added dataitem(childinfo)'s filters not working properly.
Exported data is inserting in table Export contact, code written in Mail and childinfo table,
suggest me for possibilites.
Pls suggest me in other dataitems(contact, mail, email) this code
Thanks!
Jp0 -
this instructions will filter child table, not childinfo...Child.SETRANGE(Child."Contact No.",ChildInfo."Contact No.");
Child.SETFILTER(Child."Contact No.","Contact No.");
anyway, do as kine said: link the Data Items with properties, and put the filters in onpredataitem but be careful: if you put childinfo filters in a previous data item, they will be resetted when reaching childinfo dataitem.
You must put the filters on the related dataitem.
(you can use variables and then copy the filters, but it's too long to explain and maybe useless for you in this report)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K 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
- 323 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
