SSRS 报告管理器 JavaScript 在非 IE 浏览器中无法显示下拉菜单
我一直在使用 Firefox 和 Firebug 调试 ReportingServices.js
文件。我发现 SSRS(SQL Server Reporting Services)报表管理器(报表的 Web 前端)在 Firefox (v7.0.1) 中不起作用的原因是它使用 javascript
。 lastChild
来查找元素。不幸的是,Firefox 也会将空格视为 TextNode
元素,导致元素选择无法按预期工作。
这在 IE 中有效,希望有人知道解决方案。我编辑了 javascript 以解决一个错误,但随后又遇到了另一个更复杂的错误,因此可能是一个需要手动修复的雷区。希望有一些可用的更新或补丁。
这是在 Windows 2008 R2 Datacenter 服务器上运行 SQL Server 2008 R2 Standard 版本。
如果您觉得这不是解决此类问题的论坛,我们深表歉意。在这种情况下,如果不合适,请建议我还应该在哪里问这个问题。这是一种 JavaScript 问题,但很可能是软件更新解决方案。
更新:
经过几个小时修复 ReportingServices.js
文件中的浏览器兼容性错误后,我设法让它在 Firefox、Chrome、Opera 和 Safari 以及IE。抱歉,我的回答分为两部分;我发布了该解决方案更新后的 ReportingServices.js
的完整代码。
I've been debugging the ReportingServices.js
file using Firefox and Firebug. I've found that the reason SSRS (SQL Server Reporting Services) Report Manager (web front end for Reports) doesn't work in Firefox (v7.0.1) is that it's using javascript
.lastChild
to find elements. Unfortunately, Firefox also picks up on whitespace as TextNode
elements causing the element selection to not work as expected.
This works in IE and hopefully someone knows a solution to this. I edited the javascript to get round one bug but then hit another more complicated one so probably a mine field to try to fix manually. Hopefully there is some update or patch available.
This is running SQL Server 2008 R2 Standard edition on a Windows 2008 R2 Datacenter server.
Apologies if you feel this is not the forum for such a question. In that case, please suggest where else I should ask the question if it's not appropriate. It is kindof a javascript problem but likely with a software update solution.
Updated:
After a few hours of fixing the browser compatibility bugs in the ReportingServices.js
file I managed to get it to work on Firefox, Chrome, Opera and Safari as well as IE. Sorry that my answer below is in 2 parts; I posted the entire code of the updated ReportingServices.js
for the solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经过几个小时的修改原始
ReportingServices.js
文件后,我成功修复了 javascript,使其能够在 Firefox、Chrome、Opera 和 Safari 以及 IE 上运行。尽管它有点大,但我已经在下面发布了整个编辑后的
ReportingServices.js
供其他人在需要时使用。我已将“chris edit”评论放在其编辑上方,显示旧行,以便您可以(如果您关心)遵循我所做的更改。我还在代码顶部总结了这些更改。SSRS 报表管理器 Web 界面非常有用,如果仅仅因为 Microsoft 懒得在 IE 以外的其他浏览器上测试它,而不使用它,那将是一种耻辱。这就是为什么我总是更喜欢 jQuery 而不是普通的 javascript,以避免此类跨浏览器兼容性问题。
我不得不把它分成两部分发布。希望这对其他人有帮助!
After a few hours hacking around with the original
ReportingServices.js
file I managed to fix the javascript to work on Firefox, Chrome, Opera and Safari as well as IE.Even though it's a bit big I've posted the whole edited
ReportingServices.js
below for others to use if needed. I've put "chris edit" comments showing the old lines above their edits so you can (if you care) follow what I've changed. I've also summarized these changes at the top of the code.The SSRS report manager web interface is very useful and it would be a shame not to use it just because Microsoft didn't bother to test it on other browsers than IE. This is why I always prefer jQuery over plain javascript to avoid these kind of cross browser compatibility issues.
I had to post it in 2 parts. Hope this helps others!
我的回答更新了
ReportingServices.js
的第 2 部分:Part 2 of updated
ReportingServices.js
from my answer: