To Show Filter string on report DataItem.GETFILTERS is working for Fist Tab but not For Second Tab.
How to print the Filter string on report for all tabs (data item).
My Data items are like following.
Vendor
->G/L Entry
--> G/L Account
On G/L Entry data items ReqFilterField is Posting Date, I want to show this filtered date on Report.
Filter string to be printed on the report header as below
Filter by :- Vendor Name, Posting date
Hi your post is not very clear :-s
Is it is just the one filter you want, as the other reply use the Section:
OnPreReport()
IF "G/L Entry".GETFILTER("Posting Date") <> '' THEN
DateFilterText := 'For the Period ' + "G/L Entry".GETFILTER("Posting Date");
Yes, as you can see, the filters of second dataitem are not accessible in OnPreDataitem Trigger of first dataitem. You can access the dataitem filters just in own triggers or in OnPreReport where you can see all filters of all dataitems... :-)
Answers
If the second tab filter fields are global variables that should apply to your
dataitems then in the OnPreReport you could set them to your dataitem
Here Global1 is a variable that needs to be set on the second tab
Hope this helps
Reagrds
Albert
How to print the Filter string on report for all tabs (data item).
My Data items are like following.
Vendor
->G/L Entry
--> G/L Account
On G/L Entry data items ReqFilterField is Posting Date, I want to show this filtered date on Report.
Filter string to be printed on the report header as below
Filter by :- Vendor Name, Posting date
You will have to do the following
OnPreReport
FilterText := 'Filter: ' + "G/L Account".GETFILTERS + ', ' + "G/L Entry".GETFILTERS;
Where FilterText is a Global variable of type Text
Regards
Albert
Hi your post is not very clear :-s
Is it is just the one filter you want, as the other reply use the Section:
OnPreReport()
IF "G/L Entry".GETFILTER("Posting Date") <> '' THEN
DateFilterText := 'For the Period ' + "G/L Entry".GETFILTER("Posting Date");
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
The solution sent by you has worked.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.