Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Error occurs while creating the ssrs report

Posted on by 16
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.
 
  • Martin Dráb Profile Picture
    Martin Dráb 229,275 Most Valuable Professional on at
    Error occurs while creating the ssrs report
    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.
  • GC-14061151-0 Profile Picture
    GC-14061151-0 16 on at
    Error occurs while creating the ssrs report
    yes, you right the getFirstQueryContractKey() method is the error spot. but how to solve the Error. 
  • Martin Dráb Profile Picture
    Martin Dráb 229,275 Most Valuable Professional on at
    Error occurs while creating the ssrs report
    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
    GC-14061151-0 16 on at
    Error occurs while creating the ssrs report
    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
    Martin Dráb 229,275 Most Valuable Professional on at
    Error occurs while creating the ssrs report
    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
    GC-14061151-0 16 on at
    Error occurs while creating the ssrs report
    Please solve the error.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,275 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans