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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Extending Collection Letter Report problem

(1) ShareShare
ReportReport
Posted on by 18
I have a problem with the report I have duplicated and my code is below. But when trying to print the collection letter it still loads the original report. Please note that I have already changed the print management setup as well. Do I need to create a new controller/menuitem for this?
 
switch (_docType)        {            case PrintMgmtDocumentType::CustCollectionLetter:                _result.result(ssrsReportStr(custCollectionJourXXX, Report));                break;        } 
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,779 Super User 2026 Season 1 on at
    Hi,
     
    Please give us more details.
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • GNRS1990 Profile Picture
    18 on at
    I can already see the document in print management and I have chosen the new report as my default report. But when trying to print the collection letter it still display at the screen the original report.
     
    [ExtensionOf(classStr(CustCollectionJourDP))]
    final class CustCollectionJourDP_Extension
    {
    
        protected void populateCustCollectionJourTmp(
                CustCollectionLetterJour _custCollectionLetterJour,
                CustTable _custTable,
                CustCollectionLetterTrans _custCollectionLetterTrans,
                FormLetterRemarks _formLetterRemarks,
                TaxSpec _taxSpec,
                TransDate _postingsUntil)
        {
            next populateCustCollectionJourTmp(_custCollectionLetterJour, _custTable, _custCollectionLetterTrans,
                _formLetterRemarks, _taxSpec, _postingsUntil);
    
            custCollectionJourTmp.CompanyEmail = companyInfo.email();
            custCollectionJourTmp.CompanyPhone1 = companyInfo.phone();
        }
    
    }
    
    class PrintMgmtDocTypeCollectionLetter
    {
        [SubscribesTo(classstr(PrintMgmtDocType),delegateStr(PrintMgmtDocType,getDefaultReportFormatDelegate))]
        public static void PrintMgmtDocType_getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result)
        {
            switch (_doctype)
            {
                case PrintMgmtDocumentType::CustCollectionLetter:
                    _result.result(ssrsReportStr(CustCollectionJourXXX,Report));
                    break;
            }
        }
    }
    
    
    /// <summary>
    /// Extension of the <c>PrintMgmtDelegatesHandler</c> class, add mail body to Print management setting
    /// </summary>
    [ExtensionOf(classStr(PrintMgmtDelegatesHandler))]
    internal final class PrintMgmtDelegatesHandler_Extension
    {
        protected static PrintMgmtReportFormatName getDefaultReportFormat(PrintMgmtDocumentType _docType)
        {
            ///another of my code here
        }
    
    }
    
     
  • Suggested answer
    Waed Ayyad Profile Picture
    9,066 Super User 2026 Season 1 on at
    Hi,
     
    Did you trace the code to check if your code gets executed or not?
     
    1- Try to reset usage data maybe cache issue.
    2- Try to restart SSRS reporting service.
    3- Try to restart IIS.
     
    Try my suggestion and keep me posted.
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue.
     
  • GNRS1990 Profile Picture
    18 on at
    I have tried reset data usage, restart report service and IIS. Still the same, I'm trying to debug and it seems it has hit my code but still not loading the report. Maybe I need to extend the controller or create a new controller class.
  • Waed Ayyad Profile Picture
    9,066 Super User 2026 Season 1 on at
    Hi, 
     
    Try extending the controller and if you still have an issue, share your code in order to help you.
     
     
    Thanks,
    Waed Ayyad
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 509 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 375

#3
Adis Profile Picture

Adis 268 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans