GETFILTERS on Request form.

upasanisandipupasanisandip Member Posts: 405
How can I use GETFILTERS on second tab of Request form.

I can use for first tab. But for Second tab not showing correct result.?


Anyone have idea about this?

Thanks & regards,
Sandip.

Answers

  • AlbertvhAlbertvh Member Posts: 516
    Hi Sandip,

    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

    OnPreReport()
    Item.SETRANGE(Field6,Global1);
    

    Here Global1 is a variable that needs to be set on the second tab

    Hope this helps
    Reagrds
    Albert
  • upasanisandipupasanisandip Member Posts: 405
    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
  • AlbertvhAlbertvh Member Posts: 516
    Hi Sandip,

    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
  • David_CoxDavid_Cox Member Posts: 509
    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");
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
  • upasanisandipupasanisandip Member Posts: 405
    Thanks David & Albertvh.
    The solution sent by you has worked.
  • kinekine Member Posts: 12,562
    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... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.