简体   繁体   English

从SQL Server 2008 R2更改为SQL Server 2014后不再运行报告

[英]Reports no longer run after change from SQL Server 2008 R2 to SQL Server 2014

Our crystal reports no longer run after changing the back end database from SQL Server 2008 R2 to SQL Server 2014 (both were enterprise). 将后端数据库从SQL Server 2008 R2更改为SQL Server 2014(均为企业级)后,我们的Crystal报表不再运行。 The database was backed-up on 2008 and restored on 2014 using SQL Server Management Studio. 该数据库是在2008年备份的,并在2014年使用SQL Server Management Studio进行了还原。 The .Net application works fine except for none of the Crystal Reports run. .Net应用程序运行正常,但没有任何Crystal Reports运行。 The screen simply flashes and no PDF is generated or delivered. 屏幕只是闪烁,没有生成或传送任何PDF。 Reports work fine if we change the connection string in the web.config back to the original server and DB. 如果我们将web.config中的连接字符串更改回原始服务器和数据库,则报告工作正常。 Below is the connection string with SERVERNAME, DBNAME, USER and Password changed to protect the innocent. 下面是更改了SERVERNAME,DBNAME,USER和Password以保护无辜者的连接字符串。 The only thing that gets changed is the SERVERNAME. 唯一更改的是SERVERNAME。

<add name="Pubs" 
     connectionString="Data Source=SERVERNAME;Initial Catalog=DBNAME;Integrated Security=False;User Id=USER;Password=*********" 
     providerName="System.Data.SqlClient" />

Thank you. 谢谢。

UPDATE: 更新:

After checking again, I'm now seeing authentication failures in the SQL logs. 再次检查后,我现在在SQL日志中看到身份验证失败。 I'm not completely sure if these are coming from Crystal Reports. 我不确定这些是否来自Crystal Reports。 The client IP an a completely different IIS web site IP on the same web server that shouldn't be talking to this DB. 客户端IP是同一Web服务器上不应与该DB通信的完全不同的IIS网站IP。

Login failed for user '******'. Reason: Password did not match that for the login provided. [CLIENT: x.x.x.x]
Source Logon
Message
Error: 18456, Severity: 14, State: 8.

UPDATE #2 更新#2

The developer apparently found some issues with the reports lacking a port being specified for connection and is going through the reports resolving the issue. 开发人员显然发现了一些报告缺少指定用于连接的端口的问题,并且正在研究这些报告以解决问题。

Thanks for the input. 感谢您的输入。

The developer apparently found some issues with the reports lacking a port being specified for connection when calling the report from code. 开发人员显然发现了一些问题,这些报告在从代码中调用报告时缺少指定用于连接的端口。 They are going through the reports and making the updates to resolve the issue. 他们正在查看报告并进行更新以解决问题。

Developer input follows.... 开发人员输入如下。

Had to change subreport logon: 必须更改子报表登录:

rpt.SetDatabaseLogon(sConn.UserID, sConn.Password, sConn.DataSource + ",1433", sConn.InitialCatalog);
            foreach (ReportDocument subReport in rpt.Subreports)
            {
                subReport.SetDatabaseLogon(sConn.UserID, sConn.Password, sConn.DataSource + ",1433", sConn.InitialCatalog);
                for (int i = 0; i < subReport.DataSourceConnections.Count; i++)
                {
                    subReport.DataSourceConnections[i].SetConnection(sConn.DataSource + ",1433", sConn.InitialCatalog, sConn.UserID, sConn.Password);
                    subReport.DataSourceConnections[i].IntegratedSecurity = false;
                }
            }
            for (int i = 0; i < rpt.DataSourceConnections.Count; i++)
            {
                rpt.DataSourceConnections[i].SetConnection(sConn.DataSource + ",1433", sConn.InitialCatalog, sConn.UserID, sConn.Password);
                rpt.DataSourceConnections[i].IntegratedSecurity = false;
            }

To this: 对此:

foreach (IConnectionInfo conn in rpt.DataSourceConnections)
        {
            conn.SetLogon(sConn.UserID, sConn.Password);
            conn.SetConnection(sConn.DataSource + ",1433", sConn.InitialCatalog, false);
        }

        rpt.SetDatabaseLogon(sConn.UserID, sConn.Password);

        foreach (Table t in rpt.Database.Tables)
        {
            t.LogOnInfo.ConnectionInfo.UserID = sConn.UserID;
            t.LogOnInfo.ConnectionInfo.Password = sConn.Password;
        }

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

相关问题 将数据库表从SQL Server 2014导出到SQL Server 2008 R2 - Export database table from SQL Server 2014 to SQL Server 2008 R2 TFS 2010至2013:SQL Server从2008 R2 Standard到2014 Express - TFS 2010 to 2013: SQL Server from 2008 R2 Standard to 2014 Express 无法再登录SQL Server 2008 R2 - Can no longer login to SQL Server 2008 R2 SQL Server 2014数据源在SQL Server 2008 R2报表服务器上不起作用 - SQL Server 2014 data source not works on SQL Server 2008 R2 reporting server 如何在网站上集成SQL Server 2008 R2报表 - How to integrate SQL Server 2008 R2 Reports on web site 通过SQL Server 2008 R2 Reporting Services的电子邮件报告 - Email reports via SQL Server 2008 R2 Reporting Services SQL Server 2008 R2升级/服务器迁移到SQL Server 2014 - SQL Server 2008 R2 Upgrade / Server Move to SQL Server 2014 将Crystal Reports 2008连接到SQL Server 2014 - Connecting Crystal Reports 2008 to SQL Server 2014 恢复启用了TDE的SQL Server 2008 R2数据库到SQL Server 2014时出错 - Error restoring SQL Server 2008 R2 database with TDE enabled to SQL Server 2014 在SQL Server 2014 Express上还原SQL Server 2008 R2 * .bak数据库 - Restoring SQL Server 2008 R2 *.bak databases on SQL Server 2014 Express
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM