Crystal报表连接到Azure SQL数据库.找不到表x [英] Crystal reports connecting to Azure SQL database. The table x could not be found

查看:101
本文介绍了Crystal报表连接到Azure SQL数据库.找不到表x的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个vb.net应用程序,该应用程序当前使用VS的水晶报表并连接到SQL Server 2008数据库.该应用程序现在需要使用SQL Azure数据库,但是当连接到SQL Azure数据库时,我的所有Crystal报表都会引发以下错误:-

I have a vb.net application which currently uses crystal reports for VS and connects to an SQL Server 2008 database. The application now needs to use an SQL Azure database but when connected to the SQL Azure database is raising the following error for all of my crystal reports: -

找不到表".文件错误.找不到表格.设置数据库连接后,Crystal报表将引发此错误.堆栈跟踪是从我的代码中引发的,但带有以下Crystal报表跟踪:-

The table '' could not be found. Error in file . The table could not be found. This error is being thrown by Crystal reports when the database connection is set. The stack trace is raised from my code but with the following Crystal reports trace: -

CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable,ISCRTable NewTable) 在CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)

CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable, ISCRTable NewTable) at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)

该报告实际上使用了我已验证在Azure数据库上的存储过程.

The report actually uses a stored procedure which I have verified is on the Azure database.

要尝试解决此问题,我去了报表设计器中的数据库专家,连接到数据库并打算仅检查存储过程是否确实为该报表显示,但是当连接时,数据库专家仅显示表和视图并且没有存储过程.我使用的用户名实际上是Azure SQL数据库的主用户,并且在使用任何其他工具(例如,使用Microsoft SQL Server Management Studio或SQL Server对象资源管理器)时,存储过程是可见且可访问的,并且可以正常运行

To try and resolve this I went to the database expert in the report designer, connected to the database and intended to just check the stored procedure was actually showing for the report, however when connected the database expert is only showing tables and views and no stored procedures. The username I am using is actually the master user for the Azure SQL Database and when using any other tool (for example using Microsoft SQL Server management studio or SQL Server object explorer) the stored procedures and visible and accessible and can be run without any issues.

当我切换回SQL Server 2008数据库后,报表运行良好. 我通常认为这是数据库权限问题,但是鉴于以上证据,我认为并非如此.是否有人使用Visual Studio的Crystal报表从应用程序内部连接到Azure SQL数据库?

As soon as I switch back to the SQL Server 2008 database the report runs fine. I would normally assume this is a database permissions issue but given the above evidence I don't believe it to be so. Is anyone using Crystal reports for visual studio connecting to an Azure SQL database from within an application?

我正在使用Visual Studio 13.2库的水晶报表.

I am using the crystal reports for visual studio 13.2 libraries.

推荐答案

使用Azure数据库和报告选项首次刷新时验证存储过程"时,出现错误找不到表%s" ".

I found I was getting the error "The table %s could not be found" when using an Azure database and the Report Option "Verify Stored Procedures on First Refresh" was on.

关闭此功能,不再发生错误.非Azure数据库不会发生这种情况.

Turning this off and the error no longer occurred. This did not occur with non-Azure databases.

但是,另一个问题是,SAP Crystal Reports版本(用于Visual Studio(SP 10)和完整Crystal 2013(SP4))都无法在设计器中看到Azure SQL存储的过程.

However, another problem is that both SAP Crystal Reports, version for Visual Studio (SP 10) and The full Crystal 2013 (SP4) cannot see Azure SQL stored procs in the designer.

我必须通过从Azure导出数据库并将其还原到本地SQL服务器来解决该问题,以针对本地服务器生成报告.然后,我可以针对Azure数据库运行报告.

I had to work-around that by exporting the database from Azure and restoring it to a local SQL server, build the report against the local server. I could then run the report against the Azure database.

应该注意的是,SAP的官方立场是Crystal Reports不支持Azure SQL,并且目前没有计划这样做.来源: http://scn.sap.com/thread/3430662

It should be noted the the official stance from SAP is that Crystal Reports does not support Azure SQL and there are currently no plans to do so. Source: http://scn.sap.com/thread/3430662

这篇关于Crystal报表连接到Azure SQL数据库.找不到表x的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆