Clear Setselectionfilter

bhaganbhagan Member Posts: 25
edited 2007-02-27 in Navision Attain
This is probably a rookie question but I can not seem to figure out the best way to do this.

I want to run a processon selected sales lines from the sales order form.

I have added a menu item on the sales order form that looks to the sales order subform.

The code is

CurrForm.SETSELECTIONFILTER(Rec);
REPORT.RUN(50094,FALSE,FALSE,Rec);

The report is a processing report that does some work with the selected sales lines.

My problem is that when the processing is done and the user is returned to the sales order form, the form only shows the lines he selected and has to click "showall" to see all the lines again.

How can I clear the seletionfilter automatically?
Beth Hagan

Comments

  • AlbertvhAlbertvh Member Posts: 516
    Hi Beth,

    After REPORT.RUNMODAL.....
    RESET;

    Hope this helps


    Albert
  • kinekine Member Posts: 12,562
    Best is to not use Rec for passing it to the report and using another variable created for this purpose:
    CurrForm.SETSELECTIONFILTER(MyRecVar);
    REPORT.RUN(50094,FALSE,FALSE,MyRecVar);
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,112
    bhagan wrote:
    REPORT.RUN(50094,FALSE,FALSE,Rec);
    Advice : use the name of the report, not the ID.
    REPORT.RUN(REPORT::"The Report",FALSE,FALSE,Rec);
    
    The advantage you will see if you need to know where the report is used. With the ID, you won't find it easily.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.