We have used Fetchxml for SSRS report in Dynamic CRM.
In the below code we have used link entity and condition to fetch another entity record details in one report.
<?xml version="1.0"?>
<fetch output-format="xml-platform" distinct="false" version="1.0" mapping="logical">
<entity name="opportunityproduct" >
<attribute name="productid"/>
<attribute name="productid"/>
<attribute name="productdescription"/>
<attribute name="priceperunit"/>
<attribute name="quantity"/>
<attribute name="extendedamount"/>
<attribute name="opportunityproductid"/>
<order attribute="productid" descending="false"/>
<link-entity name="opportunity" link-type="inner" alias="af" from="opportunityid" to="opportunityid">
<attribute name="parentaccountid"/>
</link-entity>
</entity>
</fetch>
<filter type="and">
</filter>
TO PASS PARAMETERS BASED ON SPECIFIC FIELDS
We can also created parameters in SSRS report based on id or specific field in SSRS REPORT.
<?xml version="1.0"?>
<fetch output-format="xml-platform" distinct="false" version="1.0" mapping="logical">
<entity name="opportunityproduct" >
<attribute name="productid"/>
<attribute name="productdescription"/>
<attribute name="priceperunit"/>
<attribute name="quantity"/>
<attribute name="extendedamount"/>
<attribute name="opportunityproductid"/>
<order attribute="productid" descending="false"/>
<link-entity name="opportunity" link-type="inner" alias="af" from="opportunityid" to="opportunityid">
<attribute name="parentaccountid"/>
</link-entity>
</entity>
</fetch>
<filter type="and">
<condition attribute="opportunityid" operator="eq" uiname="test" uitype="opportunity" value="@CRM_Filteredopportunityproduct"/>
</filter>
PARAMETERS:-
Another dataset name is the "CRM_Filteredopportunityproduct". To get link the above parameters in SSRS REPORT.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="opportunityproduct">
<attribute name="opportunityid" />
</entity>
</fetch>
ON SELECTED RECORDS:-
We can also display SSRS REPORTS on selected record in Dynamic CRM by using "enableprefiltering="1" "OR "enableprefiltering="true"" OR "enableprefiltering="false"" and
"enableprefiltering="0"".
<?xml version="1.0"?>
<fetch output-format="xml-platform" distinct="false" version="1.0" mapping="logical">
<entity name="opportunityproduct" enableprefiltering="1" prefilterparametername="CRM_Filteredopportunityproduct">
<attribute name="productid"/>
<order attribute="productid" descending="false"/>
<link-entity name="opportunity" link-type="inner" alias="af" from="opportunityid" to="opportunityid">
<attribute name="parentaccountid"/>
</link-entity>
</entity>
</fetch>
</filter>
We can also created parameters in SSRS report based on id or specific field in SSRS REPORT.
<?xml version="1.0"?>
<fetch output-format="xml-platform" distinct="false" version="1.0" mapping="logical">
<entity name="opportunityproduct" >
<attribute name="productid"/>
<attribute name="productdescription"/>
<attribute name="priceperunit"/>
<attribute name="quantity"/>
<attribute name="extendedamount"/>
<attribute name="opportunityproductid"/>
<order attribute="productid" descending="false"/>
<link-entity name="opportunity" link-type="inner" alias="af" from="opportunityid" to="opportunityid">
<attribute name="parentaccountid"/>
</link-entity>
</entity>
</fetch>
<filter type="and">
<condition attribute="opportunityid" operator="eq" uiname="test" uitype="opportunity" value="@CRM_Filteredopportunityproduct"/>
</filter>
PARAMETERS:-
Another dataset name is the "CRM_Filteredopportunityproduct". To get link the above parameters in SSRS REPORT.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="opportunityproduct">
<attribute name="opportunityid" />
</entity>
</fetch>
ON SELECTED RECORDS:-
We can also display SSRS REPORTS on selected record in Dynamic CRM by using "enableprefiltering="1" "OR "enableprefiltering="true"" OR "enableprefiltering="false"" and
"enableprefiltering="0"".
<?xml version="1.0"?>
<fetch output-format="xml-platform" distinct="false" version="1.0" mapping="logical">
<entity name="opportunityproduct" enableprefiltering="1" prefilterparametername="CRM_Filteredopportunityproduct">
<attribute name="productid"/>
<order attribute="productid" descending="false"/>
<link-entity name="opportunity" link-type="inner" alias="af" from="opportunityid" to="opportunityid">
<attribute name="parentaccountid"/>
</link-entity>
</entity>
</fetch>
</filter>
No comments:
Post a Comment