Report printed to e-mail

You can easily send a D365FO report in email just by configuring print destination to Email and setting a few properties. You can do the same from code, where you can also set the body. You must create an instance of SrsReportEMailDataContract class, fill it values and pass it to SRSPrintDestinationSettings.parmEMailContract(). Here is an example: …

Continue reading ‘Report printed to e-mail’ »

Printing reports from code in D365FO

A comment below my blog post Printing reports from code in AX2012 asked me to provide an example for D365FO. Here is it. The code is virtually identical. Only writing a file to a shared folder doesn’t make a good sense in cloud, therefore I changed the code to return the file to user for download. …

Continue reading ‘Printing reports from code in D365FO’ »

Printing dynamic parameters (AX 2012 / SSRS)

In addition to parameters specified in data contracts, reports can also use queries. It’s very handy, because users can specify filters and sorting in exactly the same way as they’re used to from other places in Dynamics AX, they can use query expressions and so on. A relative common request is printing parameter values on …

Continue reading ‘Printing dynamic parameters (AX 2012 / SSRS)’ »

Tisk reportu z kódu v AX2012

Jak vytisknout report z X++ a změnit nastavení tisku v AX2012? Mám pro vás konkrétní příklad – měl by vám dát dobrou představu jak na to, i pokud je váš případ je trochu jiný. SrsReportRunController controller = new SrsReportRunController(); SysUserLicenseCountRDPContract rdpContract = new SysUserLicenseCountRDPContract(); SRSPrintDestinationSettings settings;   // Určete, jaký report and design reportu se …

Continue reading ‘Tisk reportu z kódu v AX2012’ »

Printing reports from code in AX2012

How to print a report from X++ and change print settings in AX2012? I have a concrete example for you – it should give a good idea how to do that even if your situation is a little bit different. SrsReportRunController controller = new SrsReportRunController(); SysUserLicenseCountRDPContract rdpContract = new SysUserLicenseCountRDPContract(); SRSPrintDestinationSettings settings;   // Define …

Continue reading ‘Printing reports from code in AX2012’ »