How to run an SSRS report on a selected record in the CRM using FetchXml  - CloudFronts

How to run an SSRS report on a selected record in the CRM using FetchXml 

Posted On December 5, 2024 by Deepak Chauhan Posted in  Tagged in

If you are working with SSRS reports in Dynamics 365 CRM, you may have to run or use the report for a single selected record, depending on your need. In this blog, I will explain how to run a report on a selected record in CRM. Running a report on a selected record is also referred to as prefiltering, so let’s first understand what prefiltering is in an SSRS Report. 

What is Prefiltering in an SSRS Report? 

Prefiltering in an SSRS Report is the process of applying filters before data is retrieved from the data source. It limits the dataset to include only the relevant records by incorporating conditions directly into the query or stored procedure used to fetch data for the report. It only shows relevant data that is needed for the reporting. 

To add prefiltering to an SSRS report, follow these steps: 

– First, identify the entity you want to run the report for. If the same report needs to be run on multiple entities in CRM, you will need to add the prefiltering condition to all required entities.  

– For example, I have considered this project entity  
 
<entity name=”msdyan_project” enableprefiltering=”1″ prefilterparametername=”Parameter1″> 
 
enableprefiltering = “1” specifies that the data for ‘msdyan_project’ will be filter before report is shown for user. 
 – When running the above query, a parameter named “Parameter1” will be created automatically in Visual Studio. 

A screenshot of a computer

Description automatically generated

– Now, publish the SSRS report to the desired environment and add the required field to the related project field to the related record type and you are all set. 

A screenshot of a computer

Description automatically generated

Conclusion 

Running an SSRS report on a single CRM record is an effective way to display relevant data while ensuring the report remains context sensitive. In this blog, we have provided a step-by-step guide to adding a prefilter in your SSRS report. 

We hope you found this article useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com


Share Story :

SEARCH BLOGS :

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange