Starting personalized classic NAV reports from RTC

Starting classic reports from RTC client is ment to be more to end-user side – at least that is my opinion. But design of RTC client itself didn’t provide simple and easy going way of calling report according to customized GUI and data entitled to specific business process of end user. So to give that little edge and customer satisfaction you have to do a little customization to report itself. Here in my article I’ll show two little tricks of how to call classic reports without need of further thinking what data you’re actually trying to show.

Dummy Game

Dummy game idea is simple trick of putting one dummy data set in first as first record set of report. Basically this dummy data set will act as data provider as bookmark from RTC client – or it will copy data from RTC client row into report field as parameter.

In my example I’ll use my custom report „Vendor balance“ which will be called directly from Vendor Card Page. It is basically report we made for classic NAV and put it on vendor card. Problem with this report was it that it was still behaving like classic NAV report despite advanced functionality of calling it directly from vendor record and user needed to enter vendor data from vendor card from where it was called – double job. So here’s the dummy secret.

In first data set of report we’ve placed Dummy Data item.

Role of this dummy filter was to filter data of page that it was called from and set filer for report Record Set data. All of C/AL code is inserted into OnPreReport() trigger.

And that did the trick.

But while using this Dummy Game trick we noticed one additional misleading error which could set end user to enter data into report as if it is not needed. All of data transferred from RTC on to report with this Dummy Game is not shown in report fields. In this example we transferred Vendor VAT No. And it was not shown on request form of the report, but it was there because when we you start report it really shows record set of bookmarked vendor. So best thing is to remove this field from request form.

Also there is another catch to this. Classic reports are meant for user to, or in Dynamics NAV spirit, enter as many as parameters or values in request form fields as possible. In this case, when using Dummy Game you can call report for only one record, or better said for bookmarked record.
My recommendation is to really think through if you want to use Dummy Game or not. At the end it depends on users business process and business requirements.

Page Record Filtering - Bookmarking

Another way of calling reports from RTC is with Record filtering or setting bookmark on page itself. Unlike Dummy Game where all trick and code is customized on report itself, here we are setting filters directly on Page.
The trick in this classic report call is to set filter on action which is calling report and no report customization is needed. On specific action which is used for calling report C/AL code is inserted into OnAction() trigger.

This code runs through all of records visible on page and remembers one that you’ve bookmarked. This trick is maybe better for dummy game in a way that it can not mislead end user and it shows all bookmark data in request form fields. Bad punch line of this method is that user can see running code in RTC directly on page (glowing every row as procedure passes through data on page). In this method user can also edit values in request forms and insert values as he pleases.

And in conclusion, before using any of this methods, it is best to put all cons and pros of using filtering. This is my point of view from perspective of upgrading classic NAV to RTC when user already has experience, knowledge and routine of using classic report. And when implementing to new user I would always go for one of those methods, depending on nature of report.

Good luck!