Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

issue with report and missing field values

Posted on by 1,806 Most Valuable Professional

I have fairly simple FetchXML query for a report: 

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="opportunityproduct">
<attribute name="productid" />
<attribute name="productdescription" />
<attribute name="priceperunit" />
<attribute name="quantity" />
<attribute name="extendedamount" />
<attribute name="opportunityproductid" />
<attribute name="opportunityid" />
<order attribute="opportunityid" descending="false" />
<link-entity name="opportunity" from="opportunityid" to="opportunityid" visible="false" link-type="outer" alias="opp">
<attribute name="statecode" />
<attribute name="ownerid" />
<attribute name="actualclosedate" />
</link-entity>
</entity>
</fetch>

All of the records I expect are being returned below. However, I don’t want the second column in the report (OpportunityidValue). 

first-image.jpg

When I remove it from the table, some of the opportunity names disappear, along with the column header. I have no groups, and no sorting or filtering on the details row (which is where the table is). Does anything jump out in the query that could cause this? 

0312.image-2.jpg

*This post is locked for comments

  • Verified answer
    Megan V. Walker Profile Picture
    Megan V. Walker 1,806 Most Valuable Professional on at
    RE: issue with report and missing field values

    Hi Alex,

    I added the name attribute as suggested. Still the same missing field issue occurred.

    However, I published to CRM just to see how it looked, and all of the field values on all rows populated. In conferring with a work colleague, he shared the following:

    SSRS uses different rendering engines, for different environments.  So if you write a report in BIDS it will not use the exact same background process to generate the output as it does in the browser.

    Then, to add more joy…. There are different rendering engines for all the different formats too.

    Let’s say you write a report, with a specific format that you have to adhere to, The output (and even the result built in logic)  can be different when the report is generated via…

    • Design time (BIDS)

    • Viewed in Browser

    • Exported to PDF

    • Exported to Excel

    So one report can have many different end results depending on the method of generating it. I think I have learned to review in CRM if I see funky things like this happening again!

  • Megan V. Walker Profile Picture
    Megan V. Walker 1,806 Most Valuable Professional on at
    RE: issue with report and missing field values

    Hi Vladimir, even if I change the second column visibility and hide it, the same issue occurs. Thanks for your suggestion!

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: issue with report and missing field values

    Hi Meagan,

    try adding "name" to the link-entity attributes, and use that field for the first column(it'll probably look like opp.name in the dataset):

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">

    <entity name="opportunityproduct">

    <attribute name="productid" />

    <attribute name="productdescription" />

    <attribute name="priceperunit" />

    <attribute name="quantity" />

    <attribute name="extendedamount" />

    <attribute name="opportunityproductid" />

    <attribute name="opportunityid" />

    <order attribute="opportunityid" descending="false" />

    <link-entity name="opportunity" from="opportunityid" to="opportunityid" visible="false" link-type="outer" alias="opp">

    <attribute name="statecode" />

    <attribute name="ownerid" />

    <attribute name="actualclosedate" />

    <attribute name="name" />

    </link-entity>

    </entity>

    </fetch>

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: issue with report and missing field values

    Hi Megan, 

    You can try to use some fetch xml query, but from the table remove manually second column or set for second column visibility property to false. 

    Hope this helps

    Vlad
    http://dynamicalabs.com/

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,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans