When creating an SSRS report in CRM you can select records from a list view and only report on those selected records. The trick to doing this is in your report query. When referencing the view you are going to pull data from you should alias it in the following format.
filteredjon_customEntity as CRMAF_filteredjon_customEntity
It's important to note that brackets, or multi-part identifiers in the query will cause this to not filter correctly. The following examples will fail to correctly filter:
[filteredjon_customEntity] as CRMAF_filteredjon_customEntity
[dbo].[filteredjon_customEntity] as CRMAF_filteredjon_customEntity
dbo.filteredjon_customEntity as CRMAF_filteredjon_customEntity
What is happening in the background is when the report is uploaded to CRM it recognizes the aliased view and creates additional parameters behind the scenes for you. Reports with this feature will be shown in CRM under the heading "Run on selected records" if you do not include this or use an unsupported format the report will show under "Run on all records" in the report menu.
If you incorrectly uploaded a report with an invalid filter you can not import a corrected rdl file to CRM and have it add the additional behind the scenes filters. You will need to delete the report object in CRM and re-add the corrected report.
No comments:
Post a Comment