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)’ »

Aggregation of expressions in SSRS

Imagine you have an SSRS report with a tablix, which contains a calculated field. For example, there is a date field (from a data set) and a calculated field showing the difference between the given date and the current date: The Diff field is calculated by the following expression: =DateDiff("d", Fields!GivenDate.Value, Today) Now we want …

Continue reading ‘Aggregation of expressions in SSRS’ »

«Expr» in SSRS reports

Do you like report designs that look like this? Me neither. It may print the right data, but it’s difficult (= expensive) to maintain. Fortunately you can easily show something descriptive instead of «Expr». Right-click the value and pick Placeholder Properties… and type a description of the placeholder to Label: The designer will then display …

Continue reading ‘«Expr» in SSRS reports’ »