locked
Linked Entity in BIDS Report RRS feed

  • Question

  • Hi,

    how do you bring linked entities into a BID report? Here is a simple fetch statement I have just tested with..

    <fetch mapping="logical" count="50" version="1.0">
    	<entity name="account">
    		<attribute name="name" />
    		<link-entity name="contact" from="e2sds_currentschoolid" to="accountid">
    			<attribute name="fullname" />
    		</link-entity>
    	</entity>
    </fetch>

    I have created a data set in BIDS with this, however when I preview the report it puts hexadecimal in the field name and says it doesn't exist in the returned set...

    Warning 1 [rsMissingFieldInDataSet] The dataset ‘DataSet1’ contains a definition for the Field ‘contactbf0eeb1e_fullname’. This field is missing from the returned result set from the data source.

    it displays the main account entity fields but will not display the linked contact entity field :-( My real report is more complex than this but i was trying with this simple fetch.

    regards

    Chris

    Monday, July 15, 2013 12:23 PM

Answers

  • The error is because internally the report is taking an alias name as "contactbf0eeb1e_fullname" instead of full name. So, you should use the query in the following way :

    <fetch distinct="false" no-lock="false" mapping="logical">

    <entity name="account" enableprefiltering="1" prefilterparametername="CRM_FilteredAccount">

    <attribute name="name" alias="name" /><attribute name="accountid" />
    <link-entity name="contact" to="accountid" from="parentcustomerid" link-type="outer" alias="contact1" enableprefiltering="1" prefilterparametername="CRM_FilteredContact">
    <attribute name="fullname" alias="contact1_fullname" />
    <attribute name="contactid" />
    </link-entity></entity>

    </fetch>

    While attaching the variables, you should use alias names for the rows so that the data gets attached

    Try this as you can resolve your issue and solve the complex report.

    • Marked as answer by ChrisAdams Monday, July 15, 2013 4:29 PM
    Monday, July 15, 2013 12:50 PM

All replies

  • The error is because internally the report is taking an alias name as "contactbf0eeb1e_fullname" instead of full name. So, you should use the query in the following way :

    <fetch distinct="false" no-lock="false" mapping="logical">

    <entity name="account" enableprefiltering="1" prefilterparametername="CRM_FilteredAccount">

    <attribute name="name" alias="name" /><attribute name="accountid" />
    <link-entity name="contact" to="accountid" from="parentcustomerid" link-type="outer" alias="contact1" enableprefiltering="1" prefilterparametername="CRM_FilteredContact">
    <attribute name="fullname" alias="contact1_fullname" />
    <attribute name="contactid" />
    </link-entity></entity>

    </fetch>

    While attaching the variables, you should use alias names for the rows so that the data gets attached

    Try this as you can resolve your issue and solve the complex report.

    • Marked as answer by ChrisAdams Monday, July 15, 2013 4:29 PM
    Monday, July 15, 2013 12:50 PM
  • Thanks,

    I knew it would be something simple. I usually do plugins and java script, so never get chance to do many reports. :-)

    Chris

    Monday, July 15, 2013 4:30 PM