我在报表生成器中构建的报表中有一个名称字段。名称字段有时会显示“..”或有时显示“。 '。我想用SSRS中的表达式替换它。
我试过下面的表达式。但那不起作用:
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementsByClassName("dropdown-content")[0].classList.toggle("show");
}
// Prevent event bubble up to window.
document.getElementsByClassName("dropdown-content")[0].addEventListener('click', function(event) {
event.stopPropagation();
});
// Close the dropdown if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.matches('#dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
答案 0 :(得分:1)
如果可能,我个人更喜欢在SQL中执行此操作。
REPLACE(string_expression,string_pattern,string_replacement)