JavaScript - SQL 报告服务
我们可以在 sql 报告服务呈现的报告中插入 javascript 吗?
例如:- 当鼠标悬停在单元格上时,我想打开一个 div,就像使用 ajax 模式弹出控件一样。
Can We insert javascript in a report rendered by sql reporting services?
eg:- when mouse over happens over a cell i would like to open a div as in case of ajax modal popup control usage.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,使用 SQL 查询的结果添加 JavaScript 和 jQuery 是完全可行的。 我们获取结果并循环它们以构建一个字符串,该字符串可以将 DIV 或 CLASS 分配给行、列或单元格。 然后对它们应用悬停效果以在脚本中进行最终渲染。 我们这样做是为了根据值有条件突出显示和有条件隐藏数据,以及悬停在行/列上的颜色淡入淡出的悬停效果。
这并不难,但考虑到查询结果可能有数百行,它也可能不是最有效的方法。
我想说可行,但要检查效率。
Yes, adding JavaScript and jQuery is completely doable with the results of a SQL query. We have taken the results and looped through them to build up a string that can assign a DIV or CLASS to the rows, columns, or cells. Then apply hover effects to them for the final rendering in your script. We did this for conditional highlighting and conditional hiding of data based on values, along with hover effects for fading in a color on the row/column being hovered upon.
It is not that hard, but it also may not be the most efficient way to do it considering the chance your query results may be hundreds and hundreds of rows.
I would say doable, but check for efficiency.
我从未见过它完成,也不完全喜欢这个想法,但这里有一些我挖掘出的有关 javascript 和 Reporting Services 的信息。
链接
I've never seen it done and don't exactly like the idea, but here is some information that I dredged up concerning javascript and Reporting Services.
Link