Print RDL report from Classic Client

13 Nov

Waldo has posted a solution to print RDL reports from the Classic Client. The advantage is that you get the reports as PDF. At the other hand, you don’t have the full blown functionality of the report viewer. So I started to think about a possibility to start the RTC when you start a report in the Classic Client. Here is a method.

This approach can especially be used in case you have a mixed environment. Some of the users already are using the RTC while others are still on the Classic Client. In that case the service tier is already available. Of course you need to install the RTC on all clients. The users can still use the Classic Client, but reports will begin to start in the RTC. Also a great opportunity to let the Classic Client users get some experience in using the RTC!

The idea is to interrupt the execution of function FindPrinter in Codeunit 1. All normal reports will pass this function. Processing-only reports bypass this function.

FindPrinter(ReportID : Integer) : Text[250]

First we test if we are on the Classic Client. This can be done by using ISSERVICETIER. Then we open the DynamicsNAV url that will start the RTC, together with the runreport parameter.

This approach works on all reports and you don’t have to call web services from C/AL (which isn’t still supported in R2 on the classic client).

Maybe you don’t want to have this on all reports, but just a few. In that case add a configuration table that hold a list of the report id’s that should run via RTC. Check this table first before calling the HYPERLINK function.

2 thoughts on “Print RDL report from Classic Client

  1. Pingback: Welcome to the Dynamics blog-o-sphere! - Van Vugt's dynamiXs

  2. Thanks for this “extension” to my blog.. .

    My blog was originated from a problem we had at a customer: we created RTC reports which had to be automated with NAS, the classic environment. When automating the print of a report, you can either print it to the printer, or email .. they wanted email, so we had to be able to call the pdf-creation with NAS .. which resulted in my “solution”.. .

    I know there are other scheduling-mechanisms, so there are other (multithreaded) solutions at the moment, using the task scheduler and web services .. or .NET schedulers, or .. anyway .. multiple ways to Rome 🙂

    Keep it comin’ 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.