NAV 101: Make the request form visible again

Photo credit: zoomzoom
When you select a key by filling in the DataItemTableView property on a report DataItem, the request form is no longer shown.
How can we make it visible again?

The request form consists of two things, aside from the little list icon in the left hand corner:
- Request fields/filters where the user can select fields from the underlying table and filter on those fields if required.
- The Sort button where the user can select a sort order for the report.

As shown in the first image above, the request form will be blank if we choose a key for a DataItem at design time.
This is because NAV removes the Sort button to prevent the key defined at design time from being overridden by the user.
This is a good thing because running a report using a different sort order may produce unexpected or incorrect results.
We may well want to lock down the sort order, but what if want to allow the user to specify some filters when running the report?
To make this possible and to make the request form visible again we can enter one or more default filter fields in the ReqFilterField property.
Conclusion
By specifying a key in the DataItemTable view property and one or more fields in the ReqFilterField property we’re saying that we don’t want the user to select a key, but we do want to give them the option of specifying field filters.
The request form will then become visible again minus the Sort button.

You can see how this works in the following video clip.









No Comments
Leave a response