Crystal Reports帮助:具有子报表和“无法打开连接"的基于Web的报表; [英] Crystal Reports help: web-based reports with subreports and "Failed to open the connection"

查看:71
本文介绍了Crystal Reports帮助:具有子报表和“无法打开连接"的基于Web的报表;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

管理部门希望我从我的……帽子里抽出另一只兔子.任何帮助将不胜感激.

我们的网站上有许多CR报告.他们使用推"方法填充数据:用户选择许多过滤器,页面使用这些过滤器创建数据集,然后使用ReportDocument.SetDataSource将数据推送到报表中.多年以来,这一直很好,因为所有报告都是平坦的.

现在,我必须发布一份非常依赖子报表的报告;准确地说,其中有11个.当我尝试使用上述方法检索报告时,未呈现查看器,并且页面源上有一个友好的HTML注释,提示无法打开连接".大概是在检索报告主体的数据,而不是子报表的数据.我想我可以尝试为每个子报表生成数据集,但是这让我感到有些笨拙,特别是对于仍在开发中并且将持续几个月的报告而言.我尝试过切换到拉"方法,但是那也没有用.

因此,这是我的要求:报告的主要部分从一个视图绘制,并且不同的子报表使用该视图中的不同字段作为它们的链接参数.该报告一次只会显示一个人的数据,因此我可以使用选择过滤器.目前,网站和数据库位于同一服务器上,因此网络权限不是问题,但这将在几个月后发生变化.

如果您有任何建议或链接,我全神贯注.

Management wants me to pull yet another rabbit out of my... er... hat. Any help would be appreciated.

We have a number of CR reports on our website. They use the "push" method to populate the data: the user selects a number of filters, the page uses those to create a dataset, then pushes the data to the report using ReportDocument.SetDataSource. This has worked fine for many years, as all of the reports are flat.

Now I have to put out a report that relies very heavily on subreports; 11 of them, to be precise. When I try to retrieve the report using the above method, the viewer is not rendered and there is a nice, friendly HTML comment on the page source saying "Failed to open the connection." At a guess, I am retrieving the data for the main part of the report, but not for the subreports. I suppose I could try generating datasets for each subreport, but that strikes me as horrifically clunky, especially for a report that is still under development and will be for a few months. I have tried switching to a "pull" method, but that hasn''t worked either.

So here are my requirements: The main part of the report draws from a view, and the different subreports use different fields from that view as their linking parameters. The report will only show one person''s data at a time, so I can use a selection filter. At the moment the website and the database are on the same server so network permissions aren''t an issue, but that will be changing in a few months.

If you have any suggestions or links, I''m all eyes.

推荐答案

OP写道:

页面来源说无法打开连接."

page source saying "Failed to open the connection."


杜德,您需要在运行时应用连接.仅此而已.

无法打开连接 [ Crystal Reports Windows应用程序-无法打开连接 [如何更改Crystal Report' [ ^ ]

无法打开连接.数据库供应商代码4060 [ ^ ]

免费附件

使用Crystal Reports创建子报表 [ ASP.NET中Crystal报表中的子报表 [ ^ ]

C#Crystal Reports-子报告 [


Dude you need to apply the connection at run time, that''s all.

Failed to Open the Connection[^]

Crystal Reports Windows Application - Failed to open the connection[^]

How do I change a Crystal Report''s ODBC database connection at runtime?[^]

Failed to open the connection. Database Vendor code 4060[^]

Free Attachments

Creating Sub-Reports Using Crystal Reports[^]

SubReports in Crystal Reports in ASP.NET[^]

C# Crystal Reports - sub reports[^]


这篇关于Crystal Reports帮助:具有子报表和“无法打开连接"的基于Web的报表;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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