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

Getting object reference error while creating new copy of custom report in print management.

(0) ShareShare
ReportReport
Posted on by 97

Hi Everyone, I'm getting object reference error while clicking on the "Select" button after creating a copy of the Original. It seems it's not getting my report query.

"Original" is working fine and I'm getting the correct output of the report, this error is coming when I'm clicking on "Select" button. This is a custom report, standard reports are working fine.


Does anyone know how to resolve it?

report.jpg

I have the same question (0)
  • AnithaEswaran Profile Picture
    2,032 on at

    Can you try redeploying the report. As this is a custom report, check if the report parameters are defined as you would have duplicated the design.

  • Krishna Bhardwaj Profile Picture
    97 on at

    Already did, but I'm getting the same error for all the custom reports while clicking on "Select". It is a new report not duplicated. 

  • AnithaEswaran Profile Picture
    2,032 on at

    Have you tried building custom models with reference to Application packages option?

  • Krishna Bhardwaj Profile Picture
    97 on at

    Yes, still getting. I believe it is related to any parameter or code.

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

    Try to debug the code. Add the debugger in the clicked method select button. Also add the debugger point on PrintMgmtSetupUISettingsConditionalCtl(Class name) >> editCondition(Method). Maybe you can get some more clarification with debugging.

    Thanks,

    Girish S.

  • Krishna Bhardwaj Profile Picture
    97 on at

    In editCondition(), I'm not getting doc and maintableId, this error is coming at "if(queryRun.prompt())" line.

  • GirishS Profile Picture
    27,827 Moderator on at

    On your custom report >> Check whether you have set the "Dynamic filters" property to True on the dataset level. If not set that to true - Deployed the report and check.

    Thanks,

    Girish S.

  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    Hi Krishna,

    It seems that you might have extended / added a code in the standard handler class of PrintMgmtDocType some similar class is there with this name. There you might have added using the case statement your custom report.

    If this is right, then that is not the way how you will add the custom report in Print Management to get your report come in the Print Management format table.

    Please confirm if this is your customisation for this report.

    Thanks

    Bharani

  • Krishna Bhardwaj Profile Picture
    97 on at

    Hi Bharani,

    Yes, this is the case, I have also added another report with a case statement and it is working fine. Although every standard and some custom reports are working fine when I'm clicking on the "Select" button, but I'm getting this warning for some custom reports when I'm clicking on the "Select" button to open the query form.

    Thanks

    Krishna

  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    Hi Krishna,

    Actually what happened is for other reports you might have given a condition and added your case statement in that condition. So only with that condition your custom one will work.

    But here what might have done is you are implicitly overriding the standard function by adding a case statement through code without giving any condition. So what happens is system cannot accept that as the system code is being overriding unknowingly.

    So to add your custom report in the Print Management you need to extend one class called PrintMgmtFormatTable or something similar. All the custom reports in print management will be coming into this table and once you open the Print Mgmt form you will be able to see your custom report. Then you can select your custom report which won't give any error.

    I need to check the class name which I have used for my customisation and it is long back development and will let you know once I found that.

    Thanks

    Bharani

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

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans