welcome to XRM blog

Keep in touch with latest CRM/ERP articles

To remain competitive your organisation must be efficient across the business process spectrum. To do so you need to take sound decisions based on a balance between the cost and risk. To do so you will be heavily dependent on your content management in itself needs...


How to Create First Dynamics 365 SSRS Report with Datasource, Datasets, Design and FetchXML

By Hani Dixit on 2/9/2021

In the last blog, I told you how to Set up your workstation to create Dynamics 365 SSRS Reports.

Now In this blog, we will tell you Create First Dynamics 365 SSRS Report with Datasource, Datasets, Design and FetchXML in Dynamics 365.

Step 1- Open visual studio and Click on File -> Click on New -> Then Click on Project

You will see a Create new project dialog.

Step 2- Now from the template, and choose Report Server Project.

Step 3- Once that is loaded, from the Solution Explorer on the right-hand side, right click on the Reports folder, choose Add -> New Item

Step 4- Choose to create a Report file and give it a name. 

The "RDL" extension stands for "Report Definition Language", which is the XML interpretation of the report you created.

After the RDL file is created, you will see the report design surface.

Step 5- The first step is to create a link to your Dynamics 365 system. On the left side of the Report Designer window, in the Report Data section, right-click the Data Sources folder and click "Add Data Sources".

Step 6- If you installed the report authoring extension correctly, you should see "Microsoft Dynamics 365 Fetch" as a type.

Now provide the data source with the name and enter it in your URL for your Dynamics 365 system.

Then click on credentials and login to your Dynamics 365 login and password.

Step 7- Now we have to add a dataset to pull data from Dynamics 365. We will use a query language called "FetchXML" to add the dataset.

A quick and good way to get FetchXML queries is from Dynamics 365 Advanced Search.

Directly in Dynamics 365, just create an advanced search query, and then you choose the "Download FetchXML" button. Now an XML file containing the query will be downloaded.

Now you will see the FetchXML file, you can see the structure identifying the entity, field and filter.

Step 8- Again on the Report Data section, right click on the Datasets folder and choose “Add Dataset”.

Step 9- Provide a name, choose to use the embedded dataset that we created earlier and paste in the FetchXML statement.

Now you should see the dataset in the report data section.