O'Reilly logo

Microsoft Dynamics AX 2012 R3 Reporting Cookbook by Deepak Agarwal, Chhavi Aggarwal, Kamalakannan Elangovan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Auto e-mail, save as file tasks in reports

There are some reports that demand no user interaction and are expected to be directly saved in a file or e-mailed. This recipe will share how the printer settings contract can be used to achieve this in a simple manner.

How to do it…

This recipe has been divided into two sections. The first section details how to save the report to a file, and the second section details how to send it through e-mail.

Saving the report to a file

  1. To save a file onto the printer, create a new static method in the controller class or in the class from where the report is invoked.
  2. In the method, place the following code to save the report:
    public static void saveReporttoFile(Args _args) { /*if the controller is not overriden for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required