web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Report deployed but changes are not being made.

(0) ShareShare
ReportReport
Posted on by 55

Hi, I'm new to Dynamics 365.

I am trying to modify the CustAccountStatementExt report to add the company logo. I created a copy of the report and added the field, I created an event handler for the InventJournalTrans table to add the company logo into the CompanyLogo field that already exists in the data source, I created a class extension for CustAccountStatementExtController so I could make the parmReportName process point to the copied report, I built the project, I saved, synchronized and deployed the reports verifying there are not error messages, but when I open the report, my changes are not being reflected into the report.

I used the debug mode to verify if the report is being called and It is, I also tried restarting the SQL server reporting service after deploying the report but my changes are still not being reflected in my report, what could I do to modify my report?

Here is the code of my event handler class

class CustAccountStatementExtTmp_EventHandler
{
    [DataEventhandler(tableStr(CustAccountStatementExtTmp), DataEventType::Inserting)]
    public static void CustAccountStatementExtTmp_onInserting(Common sender, DataEventArgs e)
    {
        CustAccountStatementExtTmp  tmp = sender as CustAccountStatementExtTmp;
        CompanyInfo                 companyInfo = companyInfo::find();
        
        tmp.CompanyLogo = CompanyImage::findByRecord(companyInfo).Image;
    }
}

And the controller extension

class CustAccountStatementExtControllerExt extends CustAccountStatementExtController
{
    public static CustAccountStatementExtControllerExt construct()
    {
        return new CustAccountStatementExtControllerExt();
    }
    
    public static void main(Args _args)
    {
        SrsReportRunController                  formLetterController = CustAccountStatementExtControllerExt::construct();
        CustAccountStatementExtControllerExt    controller = formLetterController;
        
        controller.parmReportName(ssrsReportStr(CustAccountStatementExtCopy, Report));
        controller.parmArgs(_args);
        controller.startOperation();
    }
}

I have the same question (0)
  • Suggested answer
    Jay Barot Profile Picture
    1,502 on at

    restart AOS service & check.  If not working, delete the report from report folder and deploy the report again.

  • chrisrojas Profile Picture
    55 on at

    Hi, Jay

    I tried restarting the AOS service but nothing happened, should I delete the report copy from the solution explorer report folder or is It another folder?

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Chris,

    Could you please share the parameters you are using to run the report?

    Rather than creating a new controller class, you could have made a CoC on getDefaultReportFormat method in PrintMgmtDelegatesHandler class to return your new report for customer account statement -

    pastedimage1645548169089v1.png

  • chrisrojas Profile Picture
    55 on at

    Hi Gunjan,

    These are the parameters I use when I'm going to run the report

    pastedimage1645567628698v1.pngpastedimage1645567655058v2.png

    I tried making the CoC but I got the same result, is my code OK?

    [ExtensionOf(classStr(PrintMgmtDelegatesHandler))]
    final class PrintMgmtDelegatesHandler_Extension
    {
        protected static PrintMgmtReportFormatName getDefaultReportFormat(PrintMgmtDocumentType _docType)
        {
            str ret;
            switch (_docType)
            {
                case PrintMgmtDocumentType::CustAccountStatement:
                    ret = ssrsReportStr(CustAccountStatementExtCopy,Report);
            }
            ret = next getDefaultReportFormat(_docType);
            return ret;
        }
    
    }

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Chris,

    Your report name assignment has to be after the next call as you are overriding the standard functionality. Please try this code and see if that works for you.

    [ExtensionOf(classStr(PrintMgmtDelegatesHandler))]
    final class PrintMgmtDelegatesHandler_Extension
    {
        protected static PrintMgmtReportFormatName getDefaultReportFormat(PrintMgmtDocumentType _docType)
        {
            str ret= next getDefaultReportFormat(_docType);
            
            switch (_docType)
            {
                case PrintMgmtDocumentType::CustAccountStatement:
                    ret = ssrsReportStr(CustAccountStatementExtCopy,Report);
            }
            return ret;
        }
    
    }

  • chrisrojas Profile Picture
    55 on at

    Hi Gunjan,

    I tried the code you suggested but it didn't work either. I put some breakpoints to the CoC and checked them in debug mode and It seems they're not being triggered.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Chris,

    Please start debugging from main method in CustAccountStatementExtController class. The highlighted line of code should call the method you have created CoC on.

    pastedimage1645570767169v1.png

  • chrisrojas Profile Picture
    55 on at

    Hi Gunjan,

    I debugged from the main method and the line is being triggered.

  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Chris,

    So it is setting the new report name. If you have verified this, is there any specific change apart from the company logo that you could use to verify that the new report is getting printed?

  • chrisrojas Profile Picture
    55 on at

    Hi Gunjan,

    I checked and it is setting the new report name (CustAccountStatementExtCopy.Report), I put some text boxes in my report that have "Sample text" written to check if the new report is being printed, but those changes doesn't show in the printed report.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans