How to Run a Docentric SSRS Report from Code

You can print a Docentric SSRS report from X++ using the standard approach of running an SSRS report from the code. The only difference is that you have to additionally specify that the target print destination is Docentric Screen/File/Email/Printer/Print Archive and set the corresponding Docentric print destination settings.

In the following example we are going to send the built-in SSRS report – Birthdays (located in Company/Human resources/Reports/Workers -> Birthdays) to Docentric File print destination.

We have to set the target print destination to Docentric File print destination:



And we also have to fill the Docentric File print destination settings and relate them to the built-in SSRS print destination settings:

 filePrintDestSettings = new DocPrintDestSettingsFile();




If you want to execute a Docentric Print Management SSRS report, e.g. Purchase Order from the code you can do it the standard way – as you would do with a built-in Print Management SSRS report.

The print destination settings of the report are already set with Print Management Form Setup.

The following job demonstrates, how you can print more than one existing purchase orders through code. The example below prints two purchase orders, which are used with Docentric AX, as files in Word output format.

See also

Walkthrough of Docentric HcmBirthday.Report >>
Download Resources of Docentric HcmBirthday.Report Example >>
How to Use a Print Management SSRS report as Docentric Report >>