Dynamics crm 2011 MS CRM筛选视图查询在management studio中工作,但在SSRS报告向导中不工作

Dynamics crm 2011 MS CRM筛选视图查询在management studio中工作,但在SSRS报告向导中不工作,dynamics-crm-2011,reporting-services,Dynamics Crm 2011,Reporting Services,我正在使用SSRS投标创建一份报告。我的查询在报表向导中不起作用,尽管它在SQL Management Studio中起作用。我使用的是SQL 2008 R2和CRM 2011查询如下所示 SELECT FilteredBRE_licensee.bre_licensee AS Licensee, CONVERT(varchar, FilteredBRE_licensee.bre_agreementdate, 101) AS [Agreement Day],

我正在使用SSRS投标创建一份报告。我的查询在报表向导中不起作用,尽管它在SQL Management Studio中起作用。我使用的是SQL 2008 R2和CRM 2011查询如下所示

SELECT     
FilteredBRE_licensee.bre_licensee AS Licensee, 
CONVERT(varchar, FilteredBRE_licensee.bre_agreementdate, 101) AS [Agreement Day],              
FilteredBRE_keyhistory.bre_keynumber_pk AS [Key], 
FilteredBRE_keyhistory.bre_numoflicenses AS [# of licenses], 
FilteredBRE_keyhistory.bre_billingdetailidname AS [Billing Detail], 
FilteredBRE_keyhistory.bre_sendtoaccountidname AS [Account Name], 
FilteredBRE_keyhistory.bre_assignedtocontactidname AS [Assigned To Contact], 
FilteredBRE_keyhistory.bre_sendtoaccountidname AS [Account Name], 
FilteredBRE_keyhistory.bre_sendtocontactidname AS [Send To Contact], 
FilteredBRE_keyhistory.bre_billingcyclename AS [Billing Cycle], 
FilteredBRE_licensee.bre_networkminimum AS [Network Minimum], 
FilteredBRE_licensee.bre_networkoption AS [Network Option], 
FilteredBRE_licensee.bre_pcoption AS [PC Option], 
FilteredBRE_licensee.bre_combinedminimum AS [Combined Minimum], 
FilteredBRE_licensee.bre_pcoptionname AS [PC Option Name], 
FilteredAccount.bre_billing_address_line1 AS [Account Address Line 1], 
FilteredAccount.bre_billing_address_line2 AS [Account Address Line 2], 
FilteredAccount.bre_billing_address_line3 AS [Account Address Line 3], 
FilteredAccount.bre_billing_address_city AS [Account Address City], 
FilteredAccount.bre_billing_address_stateorprovince AS [Account Address State], 
FilteredAccount.bre_billing_address_postalcode AS [Account Address Zip], 
FilteredAccount.bre_billing_address_countryname AS [Account Address Country], 
Billing_Contact.bre_billing_address_line1 AS [Billing Contact Address Line 1], 
Billing_Contact.bre_billing_address_line2 AS [Billing Contact Address Line 2], 
Billing_Contact.bre_billing_address_line3 AS [Billing Contact Address Line 3], 
Billing_Contact.bre_billing_address_city AS [Billing Contact Address City], 
Billing_Contact.bre_billing_address_stateorprovince AS [Billing Contact Address State], 
Billing_Contact.bre_billing_address_postalcode AS [Billing Contact Address Zip], 
Billing_Contact.bre_billing_address_countryname AS [Billing Contact Address Country], 
Send_To_Contact.bre_billing_address_line1 AS [Send To Contact Address Line 1], 
Send_To_Contact.bre_billing_address_line2 AS [Send To Contact Address Line 2], 
Send_To_Contact.bre_billing_address_line3 AS [Send To Contact Address Line 3], 
Send_To_Contact.bre_billing_address_city AS [Send To Contact Address City], 
Send_To_Contact.bre_billing_address_stateorprovince AS [Send To Contact Address State], 
Send_To_Contact.bre_billing_address_postalcode AS [Send To Contact Address Zip], 
Send_To_Contact.bre_billing_address_countryname AS [Send To Contact Address Country]

FROM
FilteredBRE_keyhistory 
INNER JOIN FilteredBRE_licensee ON FilteredBRE_keyhistory.bre_licenseeid =         FilteredBRE_licensee.bre_licenseeid 
INNER JOIN FilteredBRE_billingdetails ON FilteredBRE_licensee.organizationid =     FilteredBRE_billingdetails.organizationid 
INNER JOIN FilteredContact AS Billing_Contact ON FilteredBRE_billingdetails.bre_billingcontactid = Billing_Contact.contactid 
INNER JOIN FilteredAccount ON FilteredBRE_billingdetails.bre_customeraccountid = FilteredAccount.accountid 
INNER JOIN FilteredContact AS Send_To_Contact ON FilteredBRE_keyhistory.bre_sendtocontactid = Send_To_Contact.contactid
WHERE     (FilteredBRE_keyhistory.bre_iscurrent = 1) AND (FilteredBRE_keyhistory.bre_status = 1)
错误

标题:Microsoft SQL Server报表设计器 保存查询设计方法时出错。已添加具有相同密钥的项


按钮:


查询中的OK在选择列表中指定了两次帐户名
“FilteredBRE_keyhistory.bre_sendtoAccountedName AS[帐户名]”。请删除它或指定其他别名。那么它就可以正常工作了……:)

您所说的“虽然我的查询在SQL Management Studio中工作,但它在报表向导中不工作”是什么意思?当您在报表中上载.rdl文件时,何时会发生错误。或者当你运行报告时?