Crystal Reports - 提供的参数无效。 无法打开行集。 ADO.Net XML

发布于 2024-07-27 13:38:04 字数 971 浏览 1 评论 0原文

好吧,这里是我有一个为 ASP.NET 3.5 重写的 VB6 应用程序的场景。 我有一些 Crystal Reports 正在更新到 Crystal Reports 10.5(包含在 Visual Studio 2008 中)。 所有旧报告都使用 OLEDB。 我所做的就是获取报告中使用的 sql 语句并将它们放入数据库中。 接下来,我运行一个自动化流程,根据这些 select 语句创建一个数据集,然后序列化该数据集并将架构和数据保存为 XML 文档。 然后,我进入旧报表,将其更新为 Crystal Reports 10.5 并更改数据源位置,以便它使用 XML 文档。

运行报告时,我创建相同的数据集,而不是将其序列化为 XML,而是将其分配给报告(见下文)。

 rd.Database.Tables(0).SetDataSource(ds)

我对此进行了测试,如果我创建新报告,但如果我采用现有报告,则不会出现任何错误并更改数据库位置我收到以下错误“

提供的参数无效”。 无法打开行集。 文件 C:\DOCUME~1\用户名\LOCALS~1\Temp\R-302 {D49E0C73-47AC-4363-AAD5-E925DFCF446E}.rpt 中出现错误:数据库参数无效。 在 CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e) 在 CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) 在 CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream

似乎报表仍在尝试使用 OLEDB 连接到旧版本数据库。 如果我使用完全相同的逻辑重写报告,但通过上述错误更新报告,我就能够使报告正常工作。 我如何解决它?

Okay here is the scenario I have a VB6 application that is getting re-written for asp.net 3.5. I have a grundle of Crystal Reports that are getting updated to Crystal Reports 10.5 (which is included in Visual Studio 2008). All of the old reports used OLEDB. What I am doing is taking the sql statements used in the reports and putting them in the database. I next run an automated process to create a Dataset from those select statements and I serialize the DataSet and save the schema and data as an XML document. I then go into the old report update it to Crystal Reports 10.5 and change the Data Source location so that it uses the XML document.

When the report is run I create the same DataSet and instead of serializing it as XML I assign it to the report (see below)

 rd.Database.Tables(0).SetDataSource(ds)

I have tested this and do not get any errors if I create the report new but if I take an existing report and change the database location I get the following error

Invalid Argument provided. Failed to open a rowset. Error in File C:\DOCUME~1\username\LOCALS~1\Temp\R-302 {D49E0C73-47AC-4363-AAD5-E925DFCF446E}.rpt: Invalid argument for database.
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e) at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream

It seems as if the report is still trying to connect using OLEDB to the old database. I have been able to get a report to work if I rewrite it using the exact same logic but the updated reports through the above error. How do I fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不语却知心 2024-08-03 13:38:04

我将其发布在这里是因为它是“无效参数提供水晶”的最高结果。

我正在 Crystal Reports XI 中处理一份报告,该报告链接到我试图通过 GUI 更改的数据源。 选择新数据源并单击“更新”似乎不会执行任何操作,我将关闭该对话框,此时我将收到消息“提供的参数无效”。 在最终关闭并重新打开文件之前,我尝试了很多方法,当我再次尝试时,它起作用了。

这允许我修改数据源而不删除任何关联的字段。

我的工作电脑出于 VPN 目的而 24/7 保持登录/打开/锁定状态,并且我在前一天打开了相关报告。 我的猜测是与 SQL 实例的连接已超时并且未重新建立。

我很抱歉否定了这个老问题,或者这是错误的做法; 但鉴于该页面在搜索结果中的突出地位,我希望这可以对其他人有所帮助。

I'm posting this here because it's the top result for "Invalid Argument Provided Crystal".

I was working within Crystal Reports XI on a report that was linked to a datasource that I was trying to change via the GUI. Selecting the new datasource and clicking Update would appear to do nothing and I would close the dialog, at which point I would receive the message "Invalid Argument Provided". I tried many things before eventually closing and reopening the file, which worked when I tried again.

This allowed me to modify the datasource without removing any of the associated fields.

My work PC stays logged in/switched on/locked 24/7 for VPN purposes and I'd opened the report in question the previous day. My guess here is that a connection to the SQL instance had timed out and was not being re-established.

My apologies for necro'ing this old question, or if this was the wrong thing to do; but given the page's prominence in search results I'm hopeful that this can help someone else.

鸠魁 2024-08-03 13:38:04

我有完全相同的错误和上下文(Visual Studio 2008 中的 Crystal Report)。
在新报告中使用我的新连接很好,但将相同的连接分配给旧报告(使用“设置数据源位置”)时,在使用具有 ExportToStream 函数的报告时出现此错误。

我最后做的是转到“数据库专家”,删除我的连接并对“删除文件”框说“确定”“此文件中的报告中有字段。继续吗?” 执行此操作会删除报告中的所有字段。 我必须重新插入它们并为我的组重新选择字段,但至少,我不必重做所有布局。

我猜这是 Crystal Report for Visual Basic 中的一个错误。

I had the exact same error and context (Crystal Report in Visual Studio 2008).
Using my new connexion in a new report was fine but assigning this same connexion to an old report (with "Set Datasource Location") got me this error when using the report with the function ExportToStream.

What I finally did was going to "Database Expert", removed my connexion and saying "OK" to the "Remove File" box "There are fields in the report from this file. Continue?" Doing this removed all fields in the report. I has to re-insert them and re-choose the fields for my groups, but at least, I didn't have to redo all the layout.

I guess, it's a bug in Crystal Report for Visual Basic.

所谓喜欢 2024-08-03 13:38:04

我在旧连接中遇到了同样的错误。

解决方案:

  • 打开子报表向导
  • 创建新连接
  • 使用新连接创建子报表

I was getting same error with older connection.

Resolution :

  • Open the sub-report wizard
  • Create new connection
  • Use new connection for creating sub-reports
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文