REPORT.RUNMODAL without filters from ZUP

Nils_van_KeulenNils_van_Keulen Member Posts: 6
Is it possible to run a report with RUNMODAL, without the Request Form and without passing a record variable, making sure no filters whatsoever are set. If the user has run the report manually and has set filters, the RUNMODAL will use those filters because they are saved in the ZUP.

Setting SaveTableView of the OptionsRequestForm to No, has no effect.
The only solution I can think of is to clear all filters in the OnPreReport when the OptionRequestForm is not shown.
Does anyone know another way?

Comments

  • ara3nara3n Member Posts: 9,258
    report.settableview(myrecord);



    Myrecord will not have any filters.

    So the report will not have any filters.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Nils_van_KeulenNils_van_Keulen Member Posts: 6
    Thanks for your answer, but I cannot use your solution. I should have said that these reports are run automatically every night in a scheduler. This means that the report is always called with a RUNMODAL(REPORT::<ReportId>,FALSE). I could create a codeunit with a variable refering to the report and use the SETTABLEVIEW as you say for every DataItem in the report, but this kills all flexibility of the Scheduler and development.
    I just want to make sure that none of the DataItems have filters set on them using the REPORT.RUNMODAL(REPORT::<ReportID>) function.
  • ara3nara3n Member Posts: 9,258
    Delete the zup file?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Nils_van_KeulenNils_van_Keulen Member Posts: 6
    Your remark, about deleting the ZUP, made me realize that the solution is to make sure the Scheduler runs on it's own client (Creating it's own ZUP), which no other "normal" user may use. This way no user filters can be set and everything runs fine... Thanks!
  • ara3nara3n Member Posts: 9,258
    Every user has it's own zup file. I didn't know that you are sharing zup files. But you are welcome. :mrgreen:
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.