Tuesday 13 June 2017

SSRS Custom Report Loaded Partial Images from Notes Entity in Dynamics CRM

For One of Our Client , I have to show images from  Notes entity in custom SSRS report.
I have to show Quote information and related Product information with images in report.


When i use this fetch XML query images display partially.



<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
  <entity name="quote">
    <attribute name="owneridname" />
    <attribute name="customerid" />
    <attribute name="quotenumber" />
    <attribute name="totalamount" />
    <attribute name="discountpercentage" />
    <attribute name="totallineitemamount" />
    <attribute name="quoteid" />
    <attribute name="modifiedon" />
    <attribute name="new_billtoaddress" />
    <attribute name="new_shiptoaddress" />
    <attribute name="new_termsconditions" />
    <attribute name="new_projectname" />
    <attribute name="new_contactphonecell" />
    <attribute name="new_fax" />
    <attribute name="discountamount" />
    <attribute name="new_properties" />
 <attribute name="new_quoteapprovedbygm" />
 <attribute name="new_salesconsultant" />
    <filter type="and">
      <condition attribute="quoteid" operator="eq"  uitype="quote" value="@QuoteId" />
    </filter>
    <link-entity name="quotedetail" from="quoteid" to="quoteid" alias="am" link-type="outer">
   <attribute name="productid" alias="am_productidname"/>
      <attribute name="priceperunit" alias="am_priceperunit"/>
      <attribute name="quantity" alias="am_quantity"/>
      <attribute name="extendedamount" alias="am_extendedamount"/>
      <attribute name="productdescription" alias="am_proddescription"/>
      <attribute name="new_properties" alias="am_properties"/>
      <attribute name="manualdiscountamount" alias="am_manualdiscountamount"/>
      <attribute name="new_discount" alias="am_discountPercentage"/>
      <link-entity name="product" from="productid" to="productid" alias="an">
        <link-entity name="annotation" from="objectid" to="productid" alias="ao">
            <attribute name="subject" />
            <attribute name="notetext" />
            <attribute name="filename" />
            <attribute name="documentbody" />
            <attribute name="annotationid" />
  </link-entity>
      </link-entity>
    </link-entity>
  </entity>
</fetch>

The issue is with    distinct="true"  make it  distinct="false" the issue resolved

Actually when distinct="true"  image is retrieved as base 64 string like BST25SASDFSDFOSDFSD09FSD9F78SDFPSODFSDF9SDF789SD7F9S8DF7S


distinct remove the repetition which results in almost half string

so the images display partially.



Numbering Table Parent group and child group ssrs report

 Recently I have faced a scenario to numbering parent group and subgroup in the following formate 10 parentGroupRow1    10.1 childGroupRow1 ...