跳转到 URL 不起作用
我有一份包含 Word 文档链接的报告。我在文本框上创建了一个“跳转到 URL”的操作,并填充了 URL。
我有一个显示报表的 PerformancePoint 仪表板,该报表位于使用 SharePoint 集成报表的报表库中。
该链接无法正常工作。遵循 这个人我用JavaScript包围了我的链接以在新窗口中打开。
除了最终结果之外,这在任何地方都有效。该链接适用于 BIDS、仪表板设计器和报告库。它无法在部署到 SharePoint 站点的仪表板中工作。有什么想法吗?
编辑: 这个 HTML 链接:
=First(Fields!Link.Value, "MyUrl")
在渲染的报告中给我这个:
<TD style="WIDTH:53.98mm;word-wrap:break-word;HEIGHT:6.35mm;" class="a7">Click Me!</TD>
这个 Javascript 链接:
="javascript:window.location.href='" & First(Fields!Link.Value, "MyUrl") & "';"
在渲染的报告中给我这个:
<a tabindex="40" href="javascript:window.location.href='http://example.com/sites/some/subsite/DocumentLibrary/Folder/MyDocument.doc';" style="color:Blue" TARGET="_top">Click Me!</a>
当你点击它时,它什么也不做。
I have a report that contains a link to a Word document. I have created an Action on the textbox that is Jump to URL, with the URL populated.
I have a PerformancePoint dashboard displaying the report, which is in a report library using SharePoint Integrated reports.
The link is not working correctly. Following the recommendations of this guy I surrounded my link w/ the javascript to open in a new window.
This works everywhere except for the end result. The link works from BIDS, Dashboard Designer, and the Report Library. It does not work from within the dashboard deployed to the SharePoint site. Any ideas?
Edit:
This HTML link:
=First(Fields!Link.Value, "MyUrl")
gives me this in the rendered report:
<TD style="WIDTH:53.98mm;word-wrap:break-word;HEIGHT:6.35mm;" class="a7">Click Me!</TD>
This Javascript link:
="javascript:window.location.href='" & First(Fields!Link.Value, "MyUrl") & "';"
gives me this in the rendered report:
<a tabindex="40" href="javascript:window.location.href='http://example.com/sites/some/subsite/DocumentLibrary/Folder/MyDocument.doc';" style="color:Blue" TARGET="_top">Click Me!</a>
Which does nothing when you click it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不熟悉 Performancepoint,但是您编写 javascript 的方式似乎简化了一点?我这么问是因为,完美的链接不起作用的唯一方法是页面中的链接返回 false。尝试将整个更改 URL 移动到一个函数中,例如:
链接为:
并在 goTo 函数中进行一些尝试和错误,抱歉无法更准确地帮助您。还可以尝试在第二个浏览器中进行测试(如果尚未测试),看看这是否是某些特定于浏览器的行为。
I'm not familiar with Performancepoint, but the way you write the javascript seems like you simplified it a bit? I'm asking because the only way that perfectly fine link would not work would be if the page has a return false for the links in it. Try moving the whole changing the URL into a function, like:
with the link being:
and do some trial and error inside the goTo function, sorry not being able to help you more precisely. Try also testing in a second browser (if you are not already) to see if this is some browser-specific behavior.
事实证明,存在两个问题。
我第一次尝试使用 https://example.com/ 渲染链接...没有成功,因为报告Services 2005 拒绝链接到 https 网站。 (此信息没有来源,只是通过实验确定)
我第二次尝试在链接周围放置 JavaScript 失败,因为 PerformancePoint 2007 仪表板不执行报表中的 JavaScript。 (此信息没有来源,只是通过实验确定)
解决方案是回到直接的 HTML 解决方案,并使用 http。这将被重定向到 https 并加载文档。如果您的环境没有自动重定向 http -->,则此解决方案可能不起作用https。
我在原来的问题中没有提到 https,因为我没有意识到这会产生影响。
It turns out that there were two issues going on.
My first attempt at rendering a link using https://example.com/... didn't work because Reporting Services 2005 refuses to link to https web sites. (no source for this info, just determined through experimentation)
My second attempt at putting javascript around the link failed because PerformancePoint 2007 dashboards don't execute JavaScript from a report. (no source for this info, just determined through experimentation)
The solution was to go back to a straight HTML solution, and use http. This gets redirected to https and the document loads. This solution may not work if your environment does not automatically redirect http --> https.
I didn't mention the https in my original question because I didn't realize that would make a difference.