简体   繁体   English

如何将CRM 2011 SSRS报告导出为SQL查询报告,而不是fetchXML报告?

[英]How to export CRM 2011 SSRS reports as SQL query reports, instead of fetchXML reports?

When I download report from CRM 2011 all queries are exported as fetch XML. 当我从CRM 2011下载报告时,所有查询都将导出为fetch XML。 I know this is for support of Online version of CRM. 我知道这是为了支持在线版CRM。 But our deployment is on-premises, and there is no need of messy fetch xml queries. 但我们的部署是本地的,并且不需要凌乱的fetch xml查询。 Is there a way to download reports so, that queries are in SQL? 有没有办法下载报告所以,查询是在SQL?

Thanks! 谢谢!

When you download reports from CRM 2011, all queries are not necessarily exported as fetchXML -- only if those queries were originally written in fetch will they be exported as fetch. 从CRM 2011下载报表时,所有查询都不一定导出为fetchXML - 只有当这些查询最初是用fetch编写时才会导出为fetch。

For example, download the rdl for the Account Overview built in report -- it contains: 例如,下载内置帐户概述报告的rdl - 它包含:

set @sql = '
SELECT top 10 CAST(accountid as nvarchar(100)) as AccountID, 
    name
FROM (' + @CRM_FilteredAccount + ') as fa'

exec(@sql)

You can convert fetchXML to SQL with linqpad's Linq2CRM extention or without any 3rd party tools just set a SQL trace and execute your fetch to capture the SQL statement. 您可以使用linqpad的Linq2CRM扩展将fetchXML转换为SQL,或者不使用任何第三方工具,只需设置SQL跟踪并执行提取以捕获SQL语句。

EDIT: Also it has been mentioned that FetchXML reports can perform better in CRM because of security concerns. 编辑:还有人提到,由于安全问题,FetchXML报告可以在CRM中表现更好。 So if messy is your only concern, perhaps potential performance trumps that? 因此,如果凌乱是你唯一关心的问题,也许潜在的表现胜过那个?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM