Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Dynamics CRM 365 error in FetchXML report: The expected parameter has not been supplied for the report.

Posted on by 100

Hello CRM365 MVPs,

I have created a FetchXMl report using BIDS and Visual Studio 2015.

Due to the scope of the report, 15 entities have been used to pull all the required information. 

Owing to the limitation in Linked Entities, I have created two FetchXML, grouping together all the related entities. The two main entities are Opportunites and Quotes.

The report works perfectly fine when all the linked entities contain at least one record. From the CRM forms, there are fields from a particular entity which are not mandatory field.

For instance, in the Competitors entity, the user may or may not enter a value for the Name field. Also, in the Payment Terms, the fields are not mandatory so the user may leave it blank.

When there is no record in any of the Competitors or Payment Terms entity, I get the error stated in the subject line.

My question is: Is it possible to trap the error in the report, like if there is no record id found for any of the linked entities then the error will be bypassed and the report will still display?

The report has already been deployed to Production and most users are already using it and they get the error when they did not enter any value for the Competitor.

Please help!!

Regards,

CRMFan

  • CRMFan Profile Picture
    CRMFan 100 on at
    RE: Dynamics CRM 365 error in FetchXML report: The expected parameter has not been supplied for the report.

    Hello Partner David,

    Thanks you very much!

    The parameter used was just for pre-filtering as the report is run on a selected opportunity record, and the report is dynamically reading the opportunity record id through JS code.

    And yes, I have used 2 fetchxml queries, the first one has Opportunity as the principal entity and the other one has Quote as principal entity.

    The report works perfectly fine when there are records in all entities linked to either Opportunity or Quote. The link-type I used for all entities was "outer". It is my assumption that by using the "outer" link, the base record would still be retrieved despite other linked entities having null values. But this is not the case.

    Is there anything that can be done through the report itself in order to handle null values in the linked entities.

    Regards,

    CRMFan

  • CRMFan Profile Picture
    CRMFan 100 on at
    RE: Dynamics CRM 365 error in FetchXML report: The expected parameter has not been supplied for the report.

    Hello Partner,

    Thank you very much. I have posted this at SQL Server Community

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Dynamics CRM 365 error in FetchXML report: The expected parameter has not been supplied for the report.

    It looks like the error is with the parameters in the report. Do you have any custom parameters, or are they just the parameters used for pre-filtering ?

    If you've created custom parameters, then you should be able to resolve this by one or more of:

    Making the parameters not required

    Specifying a default value

    Making sure any expression that uses the parameter can cope with null values

    Pre-filtering parameters should have a default value, so shouldn't cause this error

    You say you have 2 fetchXml queries. Does one data set reference the other ? If so, your problem may be in how you combine the data sets, and not handling nulls correctly

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Dynamics CRM 365 error in FetchXML report: The expected parameter has not been supplied for the report.

    Hi partner,

    I would recommend you also post this theme at SQL Server community.

    techcommunity.microsoft.com/.../SQL-Server

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans