Answered by:
Prefiltering in Fetch XML SSRS Report

Question
-
Hi,
I want to create a picking slip report (list of products) for a selected order in CRM 2011 in SSRS 2008. I'm using a fetch XML dataset to get my initial order details and then loading a subreport for that order to list all the products. It is working with a "hard coded" order but I want the selected order to print.
Here is my fetch XML:
<fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0"> <entity name="salesorder" enableprefiltering="true" prefilterparametername="CRM_salesorder"> <attribute name="customerid"/> <attribute name="salesorderid"/> <attribute name="new_orderno"/> <attribute name="ordernumber"/> <order descending="false" attribute="customerid"/> <link-entity name="contact" alias="a_fd53f109387544beb17eab2203f1ae3e" link-type="outer" visible="false" to="customerid" from="contactid"> <attribute name="mobilephone"/> <attribute name="telephone2"/> <attribute name="emailaddress1"/> <attribute name="telephone1"/> </link-entity> <link-entity name="new_event" alias="a_2f4b62606f7ae2118329000c29bdf7d8" link-type="outer" visible="false" to="new_event" from="new_eventid"> <attribute name="new_venue"/> <attribute name="new_numberofguests"/> <attribute name="new_eventstartdate"/> <attribute name="new_eventenddate"/> <attribute name="new_city"/> <attribute name="new_suburb"/> <attribute name="new_location"/> </link-entity></entity></fetch>
How can add the CRM_salesorder parameter in my fetch xml dataset query to only show that selected record?
Regards,
Anthonie
- Edited by Anthonie de Klerk Wednesday, April 17, 2013 7:36 AM
Wednesday, April 17, 2013 7:31 AM
Answers
-
Hi,
As far as i know,you have add enableprefiltering="true" in your first line of your query
Sindu M
- Marked as answer by Anthonie de Klerk Wednesday, April 17, 2013 7:58 AM
Wednesday, April 17, 2013 7:44 AM
All replies
-
Hi,
Go through these links about pre-filtering and adding parameter on the Fetch XML reports for CRM:
http://blogs.msdn.com/b/crm/archive/2011/02/23/fetch-xml-based-reports-bits-amp-pieces.aspx
http://blogs.msdn.com/b/crm/archive/2011/03/18/parameterizing-fetch-based-reports.aspx
If the answer helped you, remember to mark it as answer.
My Weblog -- My Website -- My Facebook- Proposed as answer by Payman BiukaghazadehEditor Wednesday, April 17, 2013 7:38 AM
Wednesday, April 17, 2013 7:38 AMModerator -
Hi,
As far as i know,you have add enableprefiltering="true" in your first line of your query
Sindu M
- Marked as answer by Anthonie de Klerk Wednesday, April 17, 2013 7:58 AM
Wednesday, April 17, 2013 7:44 AM -
I did go through those articles, and I do understand parameters. All of the articles state that they will go through more detail on prefiltering at a later stage. Should I have a filter condition in my fetchxml query when using prefiltering, or is it done automatically?
Wednesday, April 17, 2013 7:52 AM -
About pre-filtering it should be in your Fetch XML for specific conditions.
If the answer helped you, remember to mark it as answer.
My Weblog -- My Website -- My FacebookWednesday, April 17, 2013 7:56 AMModerator -
This worked. I think I tried to over complicate the issue. Thanx!Wednesday, April 17, 2013 7:58 AM