Skip to main content

Notifications

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;        } 
  • Waed Ayyad Profile Picture
    Waed Ayyad 7,257 Super User 2025 Season 1 on at
    Extending Collection Letter Report problem
    Hi, 
     
    Try extending the controller and if you still have an issue, share your code in order to help you.
     
     
    Thanks,
    Waed Ayyad
     
     
  • GNRS1990 Profile Picture
    GNRS1990 18 on at
    Extending Collection Letter Report problem
    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.
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 7,257 Super User 2025 Season 1 on at
    Extending Collection Letter Report problem
    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
    GNRS1990 18 on at
    Extending Collection Letter Report problem
    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
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 14,149 Super User 2025 Season 1 on at
    Extending Collection Letter Report problem
    Hi,
     
    Please give us more details.
     
    Best regards,
    Mohamed Amine MAHMOUDI

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans