Default value for filter - Report

Karen
Karen Member Posts: 79
Can anyone help me! ](*,)

When someone runs a form, they have the possibility to print a report. They get a window where they can set a filter. Does anyone know how to set a default value for that filter. (default value = current record in the form)

Comments

  • randrews
    randrews Member Posts: 135
    Use the variable of type record (VarRec) (subtype the same as in the report).

    VarRec.SETFILTER(...);
    ...
    VarRec.SETFILTER(...);
    REPORT.RUN(NumReport,Bool1,Bool2,VarRec);
  • Karen
    Karen Member Posts: 79
    But the user must have the opportunity to change the filter.

    Can I use something like NaamReport.RUN(...); or NaamReport.RUNMODAL();

    with NaamReport = C/AL Globals > NaamReport + Datatype:Report + Subtype: my report
  • Karen
    Karen Member Posts: 79
    I'll hope someone can help me
  • Karen
    Karen Member Posts: 79
    I've solved the problem.

    recordnaam.SETFILTER(...);
    reportnaam.SETTABLEVIEW(recordnaam);
    ...
    reportnaam.RUN();

    Thx for your help