D365FO – AX – SSRS – Call a custom report instead of a Standard report

How to call a custom report instead of a standard report?

Create an extension of the standard Controller class and use a Chain of command for the method “parmReportName()”

[ExtensionOf(classStr(LedgerFiscalJournalController_IT))]
final class DVLedgerFiscalJournalController_IT_Extension
{
    public SRSCatalogItemName parmReportName(SRSCatalogItemName _reportName)
    {
        SRSCatalogItemName ret = next parmReportName(_reportName);
        
        //Report name fixed to custom report
        reportName = ssrsReportStr(DVLedgerFiscalJournal_IT, Report); //Thid code override the standard report with the new custom report "DVLedgerFiscalJournal_IT"
        return reportName;
    }

Leave a comment