Hello All Overflowers!
Hoping you can help me out here. I am writing a report on D365 ONLINE 9.0, and I am almost just about done. The basic layout of the report is:
7 Total Data Sets
WorkOrder
WorkOrderProduct
WorkOrderService
ServiceAccount
BillingAccount
CustomerSignature
TechnicianSignature
All of these data sets relate back to Work Order.
For CustomerSignature, I need to grab a specific note, grab its attachment, and then pull it into my report; this is my Fetch query to accomplish that (which, the fetch works swimmingly, as tested in both VS and FetchXML Tester (XRM Toolbox)):
<fetch mapping="logical" version="1.0" distinct="true" output-format="xml-platform">
<entity name="msdyn_workorder" enableprefiltering="true" prefilterattributename="@msdyn_woid">
<attribute name="msdyn_name" />
<attribute name="createdon" />
<attribute name="msdyn_workorderid" />
<order descending="false" attribute="msdyn_name" />
<link-entity name="annotation" to="msdyn_workorderid" from="objectid" alias="af" link-type="inner">
<attribute name="documentbody" />
<filter type="and">
<condition value="customerSignature" attribute="subject" operator="eq" />
<condition value="@msdyn_woid" attribute="objectid" operator="eq" />
</filter>
</link-entity>
</entity>
</fetch>
When I validate my Fetch, I am returning a result. The document body of the target record is as follows:
<af.documentbody>iVBORw0KGgoAAAANSUhEUgAAAjkAAAGnCAYAAABVb0bDAAAABHNCSVQICAgIfAhkiAAAIABJREFUeJzt3e112tq2h/GZO853KRUgKgAqQFQAVICoAKgAUYGhAkQFlitArgClAq9UYKWC3A858nFiLUmA3nl+Y+xxz0VsWzux4c9cc8317ffv378FAACgY/6v7hsAAAAoAyEHAAB00n/qvgHgEby+vkoYhqKUkjAMJQxDiaLo7q9r2/aXxyzLEsuycj231+slPhcAuuAbPTlAccIwlB8/fohSSoIgEKWUKKXqvq2rxYHINE0ZDodi2zaBCEDrEHKAGyil5MePHx9VmbhC03Vx6In/sSxLxuNx3bcFAIkIOUCKKIrkx48ff1VlgiCo+7Yax7Ksv8LPYDCg6gOgdoQc4L/K6pt5ZLZtf1R84vBjmmbdtwXgQRBy8JDiQBMEwUewQTUsy5LZbCaLxUKGw2HdtwOgwwg56Ly4fyYONHUsN/V6vS+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f98VxnMym5P1+z/BAoAUIOUh0bd/NdDqV/X7Pbim0XhRFMpvNMreaO44jx+OxorsCcAuWq/CXIAhkNBqJ4zi5As5gMJDz+Sy+7xNw0AmmaUoQBJmVGs/zZDQa3TTVG0A1qORARK6fd2MYhuz3e4b4odM8z5Plcpn6HNM05Xw+05AMNBCVnAcXRZHsdjvp9/u5A852uxWlFAEHnec4jlwuFzEMQ/ucKIpkMpmI53nV3RiAXKjkPLDdbnfVIZr03eBR5R0eyOBAoFkIOQ/odDqJ67qilMr1fObdAH8qNuv1Wk6nU+rzZrOZHI9HdhgCDUDIeSBBEMhyucwdbui7Ab7KMyV5OBzK8/MzVU+gZoScBxAEgex2OwmCIPe/w7wbQM/zPFmv16nzdGhIBupHyOmwW04Ip+8GyCfv</af.documentbody>
But, when I render the report, it appears only the top 1/5th (or so) of the image is actually being displayed. I am wondering if there is some escape character inside the DocumentBody return variable (above), or something else that may be causing my issue? When I download the attachment directly from D365, the image is not corrupted - and is displayed in full.
Here is a snapshot of the image that is rendered within the report. As you can see, it is not fully rendered:
The Image control in my report is configured as:
Image Source: Database
MIME Type: image/png (all signature files are default saved as .png via Resco/FS Mobile app)
Use this Field: =First(Fields!af_documentbody.Value, "CustomerSignature")
For what its worth (likely nothing) - I am pulling the signatures in from the Field Service Mobile app.
Any ideas as to why this is failing? Has anyone faced this issue and overcome it in the past?
Thanks in advance!