简体   繁体   English

JavaScript - SQL Reporting Services

[英]JavaScript - SQL Reporting Services

Can We insert javascript in a report rendered by sql reporting services? 我们可以在由sql报告服务呈现的报告中插入javascript吗?

eg:- when mouse over happens over a cell i would like to open a div as in case of ajax modal popup control usage. 例如: - 当鼠标悬停在一个单元格上时,我想打开一个div,就像ajax模式弹出控件的使用情况一样。

Yes, adding JavaScript and jQuery is completely doable with the results of a SQL query. 是的,添加JavaScript和jQuery完全可以使用SQL查询的结果。 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. 我们已经获取结果并循环遍历它们以构建可以为行,列或单元格分配DIV或CLASS的字符串。 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. 我会说可行,但检查效率。

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. 我从来没有看到它完成,并且不完全喜欢这个想法,但这里有一些关于javascript和Reporting Services的信息。

http://geekswithblogs.net/mnf/archive/2007/11/25/sql-server-reporting-services-notes.aspx http://geekswithblogs.net/mnf/archive/2007/11/25/sql-server-reporting-services-notes.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM