How to clear field filters in Navision 4.0 reports

venkateshvenkatesh Member Posts: 51
Hello,
i am having a command button named Reset in the request option form of the report.When i click the button,it should clear all the field filters that is previously set in the report.

i tried giving clear(object),clearall in the OnPush() event of the command button - Reset.but it is not clearing the filter contents.

can anyone please giude me to solve this problem.

thanks,

regards,
venkatesh

Comments

  • kinekine Member Posts: 12,562
    To be able to help you I need to know what is your goal...

    Please, descibe what you want to do...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • venkateshvenkatesh Member Posts: 51
    hello kine,
    i have created one report to filter contacts based on job responsiblity,industry group,Contact profiles,segments etc...,after i execute the report and see the preview, i will either continue the filteration by adding some more filter values with the existing filters OR i will CLEAR all the existing filters and give new set of filter values to the report.

    For Clearing all the existing filter values, i have used one Command button named 'RESET' in the Request option form(Option Tab page) of the report.

    when i open the report after executing one time with some filters,if i want to change all the filters that i have given already,i will click on the RESET button to clear or delete all the filter values in the report.

    i have written the following code in the OnPush() event of the Reset commandbutton:

    CLEARALL;
    CLEAR(Contact);
    CLEAR("Contact Business Relation");
    CLEAR("Contact Mailing Group");
    CLEAR("Contact Industry Group");
    CLEAR("Contact Job Responsibility");
    CLEAR("Contact Profile Answer");
    CLEAR("Segment Line");

    but when i click the RESET button,only the local variable values i have used is cleared.the field filter values is not cleared.

    please guide me to solve this problem


    thanks,


    regards,
    venkatesh
  • kinekine Member Posts: 12,562
    In my opinion it is not possible to clear the filters on dataitems in a way that you can see this change on the request form (on the pages with filters for the dataitems). This filters are handled separatly and there is no way how to change the filters you can see within C/AL code.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.