How to clear previous filter on request form of Report

gisongison Member Posts: 128
Dears,

I got a problem on the Report.
Once user executed the report, system will remember the filter user gave.
Does there have any way to clean this filter or make system not keep this filter?
:wink:

thank you for your help.

Comments

  • kinekine Member Posts: 12,562
    Check the report properties...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • xinxin Member Posts: 10
    Check the properties, there is SaveValues property, set it to NO
  • gisongison Member Posts: 128
    Actually, i cannot find the control point from the report properties.

    thank you
    :)
  • xinxin Member Posts: 10
    gison wrote:
    Actually, i cannot find the control point from the report properties.

    thank you
    :)

    :) it's on the request form property, not the field property in the request form. Just click on the request form and search.

    Thanks
  • vijay_gvijay_g Member Posts: 884
    xin wrote:
    gison wrote:
    Actually, i cannot find the control point from the report properties.

    thank you
    :)

    :) it's on the request form property, not the field property in the request form. Just click on the request form and search.

    Thanks
    i think guy asking about Dataitem Filter not option form filter.
  • gisongison Member Posts: 128
    vijay_g wrote:
    i think guy asking about Dataitem Filter not option form filter.

    yes, you are right, the problem is on Dataitem filter.
  • ara3nara3n Member Posts: 9,256
    call the report from a codeunit and pass a record without any filters.


    report.SETTABLEVIEW(recordwithout anyfilter);
    report.runmodal;
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • gisongison Member Posts: 128
    ara3n wrote:
    call the report from a codeunit and pass a record without any filters.
    report.SETTABLEVIEW(recordwithout anyfilter);
    report.runmodal;
    

    Since we run the report by different way, and this report have more than one DataItem (ex: Sales Header, Purchase header, Sales Invoice...), so it's possible have filter on other DataItem.

    REPORT.RUN(ReportSelection."Report ID",FALSE,FALSE,SalesInvHeader);
  • David_170David_170 Member Posts: 1
    Same problem here !

    I would like to clear previous filter without other report or any other thing !
  • aejlskovaejlskov Member Posts: 1
    I just had the same problem.

    A report with 2 dataItems, where the user can set filters on both dataitems. When running the report. NAV will remeber the filters set on both dataitems, the next time the user want's to print the report.

    When running your report, instead of using:

    Report.RUN(REPORT::MyReport,TRUE,FALSE,MyRecord1)

    Use this:

    MyRecord1.RESET;
    MyRecord2.RESET;

    MyReport.SETTABLEVIEW(MyRecord1);
    MyReport.SETTABLEVIEW(MyRecord2);
    MyReport.RUN.

    where MyRecord1 and MyRecord 2 are variables of datatype Record equal to the dataitems used in the report
    and MyReport is a variable of datatype Report.
  • julkifli33julkifli33 Member Posts: 1,092
    how about clear filter for the page???
    CurrPage.SETSELECTIONFILTER(Rec);
    REPORT.RUN(50000,TRUE, FALSE,Rec);
    
    what should i add to clear the filter, after i pull the report?
  • Tommy_SchouTommy_Schou Member Posts: 117
    Use a variable of the same type as Rec and use that in your SETSELECTIONFILTER and REPORT.RUN instead of Rec.
    Best regards
    Tommy
  • AntidotEAntidotE Member Posts: 61
    aejlskov wrote:
    I just had the same problem.

    A report with 2 dataItems, where the user can set filters on both dataitems. When running the report. NAV will remeber the filters set on both dataitems, the next time the user want's to print the report.

    When running your report, instead of using:

    Report.RUN(REPORT::MyReport,TRUE,FALSE,MyRecord1)

    Use this:

    MyRecord1.RESET;
    MyRecord2.RESET;

    MyReport.SETTABLEVIEW(MyRecord1);
    MyReport.SETTABLEVIEW(MyRecord2);
    MyReport.RUN.

    where MyRecord1 and MyRecord 2 are variables of datatype Record equal to the dataitems used in the report
    and MyReport is a variable of datatype Report.

    Thanks a lot!
    How can we make difference between several dataitems to the same record?
    It is hard to swim against self bloodstream... (c) Old, experienced kamikadze.
Sign In or Register to comment.