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, ...
Answered

How to duplicate correctly standard Cust aging Report and add new filter ?

(0) ShareShare
ReportReport
Posted on by 229

Hi guys,

I need to find the best way to duplicate the standard report named 'Cust Aging'. I didnt touch to report still a while and never duplicate standard.


First, i tried to duplicate all standard object linked to that report and replacing object names in all that class but i don't know if i'm wrong by doing that ?

Then when i will get that duplication correctly i need to add a lookup field on dialogue page and filter my report result by the chosen value.

I need to do that with all Best Practices please and the less customizations.

Regards. 

I have the same question (0)
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    I haven't seen that report yet.

    But as you said you need to add new filter to aging, assuming there is a query in backend for parameters, you need to extend the query and add your range accordingly.

    Then you just need to extend menu item, call your new controller class and then extend the standard dp class.

  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi Mack Nate,

    It seems you are going to add new parameter in the CustAging Report - So as per my suggestions it's difficult to filter the dp class code based on the parameter.

    So, it will be better to duplicate all the objects related to report.

    Thanks,

    Girish S.

  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi Mack, Generally we don't need to duplicate all objects unless we want to keep standard report as well. 

    You can check this article

    nuxulu.com/.../

  • Awaxx Profile Picture
    229 on at

    Yes i wanna keep standard report too.

    I have reset all my changes.

    I need to do it step by step and keep it simple

    First step : i duplicated class controller, report menu item and linked it to standard. My report (based on standard) is opening without issues.

    Second step : What will i need to duplicate next ?

  • Awaxx Profile Picture
    229 on at

    Any idea ?

  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    Since you want to keep standard report as well, I am assuming you will be creating new menu item for your custom report. If yes, then duplicate DP, contract, UI builder classes as well. Create new menu item, security privilege.

  • Awaxx Profile Picture
    229 on at

        protected void preRunModifyContract()
        {
            GGECampusCustAgingReportContract contract = this.parmReportContract().parmRdpContract() as GGECampusCustAgingReportContract;
            this.parmReportContract().parmReportName(this.getReportName(contract));
            super();
        }

    protected str getReportName(GGECampusCustAgingReportContract _contract)
        {
            str reportNameLocal;
    
            if (_contract.parmDetailed())
            {
                if (_contract.parmIncludeAmountCur())
                {
                    reportNameLocal = ssrsReportStr(CustAgingReport, DesignWithDetailAndWithTransactionCur);
                }
                else
                {
                    reportNameLocal = ssrsReportStr(CustAgingReport, DesignWithDetailAndNoTransactionCur);
                }
            }
            else
            {
                if (_contract.parmIncludeAmountCur())
                {
                    reportNameLocal = ssrsReportStr(CustAgingReport, DesignWithNoDetailAndWithTransactionCur);
                }
                else
                {
                    reportNameLocal = ssrsReportStr(CustAgingReport, DesignWithNoDetailAndNoTransactionCur);
                }
            }
    
            return reportNameLocal;
        }

    I duplicated class contract and renamed but when i ran the report in debug mode the 'contract' value is 'Null' i dont know why and then i got an error #

    Something went wrong while generating the report. Please try again.

    I debug and find that the error come from line ' if (_contract.parmDetailed())' on getReportName method.

    Someone could help ? What am i missing ?

  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi, Have you duplicated CustAgingReportUIBuilder and replaced contract class?

  • GirishS Profile Picture
    27,827 Moderator on at

    On the contract class have you mentioned the UI builder clas?

    Refer to the class HcmWorkerResumeContract.

    Thanks,

    Girish S.

  • Awaxx Profile Picture
    229 on at

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 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans