CRM 2013/2015 – Reports

UPD from 15/03/2016

CRM 2015

  1. CRM 2015 – Reports – SPN / SSPI Problems

The “Query execution failed for dataset ‘DSMain’.” error was solved with correct SPN.

2.Fetch XML based reports in Dynamics CRM – useful user guide!

CRM 2013

1. CRM 2013 Pre-Filtered Report error

Hi ,

im working on SSRS report in Dynamics CRM 2013 ( Dynamics CRM 2013 SP1 update rollup 1 on-premise ) in SQL Server Data Tools.
I would like to iclude account prefiltering in my report .
I tried CRMAF alias:
select name from filteredaccount as CRMAF_FilteredAccount
and also explicit pre-filtering:
declare @sql varchar (max)
set @sql = ‘select name as [StoreID] from (‘+@CRM_FilteredAccount+’)as Acc’
exec (@sql)
When I execute the report from report area filter is set do default value.

But when i execute the report from the account view – run report on the selected reports, or from account form i recieve following error on report loading:
“There are some clauses that have error in the please remove them and try again”

When i remove the condition with error from the filter and set any condition report is displayed correctly.
Did you experience something similar or can you please provide some workaround ?
For me it seems as CRM 2013 bug.
Thanks in advance.


When you run a report from the grid, it automatically pellets using the current view, so no permitting would apply. Same if you run from a specific record. I believe at least

  • Clint

    Not sure I follow exactly @Marian, but I do see few things. The error (if that is the exact error message) seems to indicate that you have an attribute in the select that does not exist. If that is the exact SQL you are using, that would not make sense. Perhaps you could clarify a bit.

    Other than that, I have had some real performance problems using the filtered view for Accounts, like 30 seconds vs. less than .04 seconds when there were some additional joins involved. Have you considered using FetchXML instead? That would be pretty simple for the example query you showed

    The other thing that I wasn’t clear about is if you are having issues with the default filter that CRM applies to reports. If you have not looked at that, go to the reports are, select the report and click the Edit Default Filters button on the command bar. Sorry if I am not quite understanding the issue, but these are the things that come to mind.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: