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

Error occurs while creating the ssrs report

(0) ShareShare
ReportReport
Posted on by 42
public static void main(Args _args)
{
    YPG_rentalreport2 obj=new YPG_rentalreport2();
    obj.parmReportName(ssrsReportStr(YPG_Vehicle_Report, PrecisionDesign1));
    obj.parmArgs(_args);
     obj.setRanges(_args,obj.parmReportContract().parmQueryContracts().lookup(obj.getFirstQueryContractKey()));
    }
  }
 
// I have error on the marked line.
 
// Error: The value // is not found in the map.
 
I have the same question (0)
  • GC-14061151-0 Profile Picture
    42 on at
    Please solve the error.
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    Which line and statement do you mean? Isn't it thrown inside lookup()?
     
    Which version of AX is it about?
  • GC-14061151-0 Profile Picture
    42 on at
    6th line : obj.parmReportContract().parmQueryContracts().lookup(obj.getFirstQueryContractKey()) this is the error spot.
    I am using d365 f&o version: 10.0.37 (10.0.1725.47)
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    Continue debugging to find out the exact place. I believe you'll find it's it's indeed inside lookup(), as I suggested, and the reason is that the value returned by getFirstQueryContractKey() does not exists in the collection of contracts. I can only assume, but you can easily see it to be sure.
     
    Moved from Dynamics AX forum.
  • GC-14061151-0 Profile Picture
    42 on at
    yes, you right the getFirstQueryContractKey() method is the error spot. but how to solve the Error. 
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    Your code assumes that one of the parameters of the report is a query. But is it really the case? If not, the fact that the query can be retrieved and an error is thrown is the expected behavior.

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

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans