简体   繁体   English

如何避免在Dynamics CRM 2011 SQL报告中嵌入连接字符串?

[英]How do I avoid embedding the connection string in a Dynamics CRM 2011 SQL report?

I have used BIDS (VS2008) to develop a SQL-query report for a Dynamics CRM 2011 instance. 我使用BIDS(VS2008)为Dynamics CRM 2011实例开发SQL查询报告。 This runs OK in VS preview but I'm puzzled as to how to deploy it because the RDL file has the database connection string hard-coded in it. 这在VS预览中运行正常,但我对如何部署它感到困惑,因为RDL文件中的数据库连接字符串是硬编码的。 Surely this should not be present in the RDL, because that will make it impossible to promote the report through DEV, UAT and into LIVE? 当然,这不应该出现在RDL中,因为这样就无法通过DEV,UAT和LIVE来推广报告? I suspect that I have missed something fairly basic but if anyone could advise me, I would be grateful. 我怀疑我错过了一些相当基本的东西,但如果有人能告诉我,我将不胜感激。

My guess is that when you suck it in through the Report Manager, there's a mechanism in there that will change the connection string in the report to that of the target system. 我的猜测是,当您通过报表管理器将其吸入时,会有一种机制将报表中的连接字符串更改为目标系统的连接字符串。 I haven't dug deep to try and figure it out for sure but I've not had a problem deploying rdl files before. 我没有深入挖掘尝试并确定它,但我之前没有遇到过部署rdl文件的问题。 It just automagically works. 它只是自动化工作。

When you deploy a report into CRM it will take any connection strings and make sure they are pointing to the correct CRM database. 将报告部署到CRM时,它将采用任何连接字符串并确保它们指向正确的CRM数据库。 This can cause problems if you are using another external database but there are work arounds. 如果您使用其他外部数据库但是有解决方法,这可能会导致问题。 But for a simple report that only uses CRM data you don't have to do anything 但对于只使用CRM数据的简单报告,您无需执行任何操作

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

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