Rahul Sharma: Microsoft Dynamics CRM 2011 Fetch XML based Custom Reports
Microsoft Dynamics CRM 2011 comes in two flavors, online and on-premises. Fetch-Xml method of report development can be used to create custom SSRS reports for both the types of CRM deployments.www.RahulSharma.in
To get started with the development, make sure you have installed the below two pieces of software:
- SQL Server 2008 R2 Business Intelligence Development Studio (BIDS). Installing BIDS will also install Visual Studio 2008 cut down version to develop SSRS reports.
- Microsoft Dynamics CRM 2011 Fetch Authoring Extension for BIDS. This will give you ability to add Microsoft Dynamics CRM Fetch data source in your SSRS report. To configure this data source for your report you need to provide CRM Server URL, Organisation Unique Name and Windows Live Credentials or Domain\LoginId.
By installing and configuring the Fetch XML data source, creating a report is as simple as creating a normal SSRS report except rather than choosing Microsoft SQL Server as your data source you chose Microsoft Dynamics CRM Fetch as your report data source.
These CRM reports are regular RDLs with Fetch XML as the data query language and the data provider is MSCRMFETCH.
There are two ways to create custom CRM reports:
First option is you create a basic report through CRM Report Wizard and then download RDL to modify it in BIDS. The Report wizard creates fetch-xml based reports and this can be a good starting point to learn or start developing your fetch-xml based reports.
Second, you can create fetch-xml report from scratch in BIDS.
In this article, we will see how to create fetch-xml based reports from the scratch in BIDS.
Create Fetch-XML Report:
Overview of Fetch-XML syntax:
Let's have a quick look how you can define and use fetch-xml as your report query.
In the above xml, tag defines CRM entity you want to query and tag defines that you want to fetch all columns. In case you want to fetch selected columns use below...
"alias" attribute is to define a different column name.
Define sort order: Use tag.
Define conditions or filters: Use tag.
Another example could be,
Define entity relationships: Use tag.
Define parameters: You can also define parameters on the fetch-xml query to take user input.
Above xml will create a query parameter, pInvoiceId. Parameter names need to start with @ sign. Also adding the parameter in the fetch query also adds the QueryParameter and ReportParameter nodes in the RDL automatically.
Define Pre-Filtering: This is a way to filter your report data using CRM Advance Find Functionality. Pre-Filtering actually makes your report context sensitive.
To get it working, you need to add two attributes to the tag in your fetch-xml.
"enableprefiltering", will make the particular entity context sensitive and "prefilterparametername" is optional attribute to provide a name to your pre-filtering parameter. Pre-Filtering adds a Query & Report Parameter to your report, if "prefilterparametername" not provided then the parameter name would be CRM_.
I will try to add more examples later on but for now I think that's enough to get started with Fetch-Xml based reports.
Join this blog and feel free to post your comment / feedback / queries.
Microsoft Dynamics CRM Report Authoring Extension Installation Instructions
|axinthefield: Dynamics AX Event IDs||Blog bot||DAX Blogs||0||01.03.2011 22:11|
|Microsoft Dynamics CRM Team Blog: White Paper: Microsoft Dynamics CRM 2011 Configuring Claims-based Authentication||Blog bot||Dynamics CRM: Blogs||0||23.02.2011 01:16|
|Microsoft Dynamics CRM Team Blog: Cloud-Based Version of Microsoft Dynamics CRM 2011 Now Available Worldwide||Blog bot||Dynamics CRM: Blogs||3||18.01.2011 03:13|
|Microsoft Dynamics CRM Team Blog: Creating Custom Sample Data for Microsoft Dynamics CRM 2011||Blog bot||Dynamics CRM: Blogs||0||07.01.2011 03:15|
|Microsoft Dynamics CRM Team Blog: Microsoft Dynamics CRM 4.0 Bookshelf||Blog bot||Dynamics CRM: Blogs||1||22.01.2009 04:46|
|Опции темы||Поиск в этой теме|