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
0
Comments
If you want to add filtering based on parent dataitem, check the Properties of the dataitem and set the linking...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
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!
Jp
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)
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog