AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 15.04.2011, 00:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
Rahul Sharma: Microsoft Dynamics CRM 2011 Fetch XML based Custom Reports
Источник: http://feedproxy.google.com/~r/Rahul...fetch-xml.html
==============

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.

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:

  • Launch Business Intelligence Development Studio.
  • Create a new Report Server Project.


  • In Solution Explorer, right-click Reports folder, and click ‘Add New Report’. A Report Wizard will open up. Click next on the first introduction page.


    Note: To edit exiting custom report created through CRM Report Wizard, select "Add > Existing Item..." above instead of "Add New Report". You can download your custom report from CRM, by selecting your report then Edit > Download Report.


  • Select the Data Source. Choose a name for your data source, on the Type drop down, select Microsoft Dynamics CRM Fetch as your data provider and provide the connection string of your CRM instance.

    Connection string should be in the following format:
    CRM Server URL;[Org Unique Name];[Home Realm URL]

    If Organization Name is not provided and user belongs to multiple orgs, then the first org returned by CRM is used. To get Org Name, go to CRM > Settings > Customizations > Developer Resources.



    Home Realm URL is needed when we use Federation for identity management, and url is the identity provider's url.

    Also provide report credentials. If creating report for CRM online then provide Windows Live ID or if on-premises then provide domain\LoginID
    Click next.
  • Design the Query. Define fetch-xml query that will retrieve the data for your report. Simple and fast way to create fetch-xml is by using CRM itself.
    • Navigate to CRM Advanced Find, and specify a query.
    • You can pick the individual columns to be displayed on your report by selecting ‘Edit Columns’.
    • After you are satisfied with your query, click ‘Download Fetch XML’.
    • Save the fetch-xml to your local drive.
    In the Query string textbox, copy and paste the content of the fetch-xml you saved above. You can also preview your data on the query designer.

    Click next, select other reporting options on other pages of the wizard and you are done. :)
  • Now, upload your RDL on the CRM server in the appropriate categories and your report is ready to be displayed in CRM.
So, we have just created a custom 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,
SomeValue AnotherValue

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.

References:
Microsoft Dynamics CRM Report Authoring Extension Installation Instructions
www.RahulSharma.in






Источник: http://feedproxy.google.com/~r/Rahul...fetch-xml.html
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
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
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 21:47.