Default Filters on a Report

I want to design a report with a default filter in some fields and giving the user the capability to change this. So if the user promts for filtering, the defaults values are shown. I want to do it on report design. OnInitReport trigger does not save filters so the request form has no filters. I know the way to execute REPORT.RUN(No,…,Rec) but what if I want to execute the report from then report list ?

Hi, As far as I know it’s not possible to set defaults on the filters that way. The few times a came across the need for defining default filters, I put them on the Request Form. But, I only do this when the default is almost never changed - otherwise users get confused between the workings of “standard” Navision reqforms with filters and the “custom” Req form. Hope this helps. Michiel

Create a small (processing only) report that sets the filters on the actual report and then calls it.

If you want to set default values in Request form, define them in the OnOpenForm trigger of the Request Form. If it’s about a DataItem, you can’t do it by running report directly. You have to run it from other object using REPORT.RUN(No,…,Rec) where you set filters on Rec before.

Have a look at table 110, function PrintRecords to have an example how to achieve to setup these filters… this function get called from the Posted Sales Invoice form. Saludos Nils