Problem with MARKEDONLY

alsolalsol Member Posts: 243
Hi there,
I have a problem wit the MARKEDONLY function:

On a form I mark some of the lines. Then I have a button on this form which runs a report.
On this report I have MARKEDONLY(TRUE); in the OnPreDataItem Trigger. But there is no output.
Does this mark only stay in as long as I am in that form? Or what did I wrong.

Regards

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    What function are you useing to call the report?

    If you use somthing like this

    CurrForm.SETSELECTIONFILTER(GLACC);
    REPORT.RUN(REPORT::"Chart of Accounts", true, false, glAcc);
    

    It should work
  • ara3nara3n Member Posts: 9,257
    how do you run the report? can you put the code in here?

    Basically you need to set the filter before running the report. The report should not have on perdataitem filter


    here is an example of running the item list report from item list form




    Rec.MARKEDONLY(true);
    report.runmodal(10143,true,false,rec);
    Rec.CLEARMARKS;
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • alsolalsol Member Posts: 243
    Ok, that works perfect. Thank you!

    I used report.RUN(...) and there it didn't.
    What is the difference between RUNMODAL und RUN?

    Regards
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    The difference is explained somewhere on his form.

    Modal means the rest of the code will wait for the report to finish.

    It should work with both run and runmodal, the trick is to add the MARKEDONLY to the parameter of the report. (or SETSELECTIONFILTER)
Sign In or Register to comment.