Request Forms / Pages of Reports
Using virtual tables you can also create request forms / pages for Microsoft Dynamics NAV 2015 reports to set filter and options on it. An example of a request form / page for a report can be found in the core application of the Anveo Client Suite on web page with code RPT_CUSTTOP10. To create a request form / page using virtual tables, do the following:
- Open the request form / page of the report and create for each table on which you want to filter a virtual table with the appropriate fields (e.g. Customer table, fields No., Customer Posting Group, Currency Code, Date Filter).
- If the report has options: Create a virtual table for these options. Each variable corresponds to a field in the virtual table and has the same data type as the variable. Variables of type option will also need the same option values .
- Create a Anveo Page based on the virtual tables you have defined previously.
- Define an action code for calling the report (Setup > Action Codes) and enter that action code in a menu entry on the new Anveo Page.
- Program the functionality of the action code in the OnAction trigger in the codeunit ACF Events or in the OnAction trigger in a codeunit of your module. The programming should be similar as in the codeunit ACF Events Sales & Marketing, function OnAction_RPT_CUSTTOP10().
- If your report has options: Define in the report a function to transfer the options. Calling this transfer function should be performed like in the function OnAction_RPT_CUSTTOP10() codeunit ACF Events Sales & Marketing, based on the commented-out section with the Report Options.