简体   繁体   English

SSRS 更改项目符号颜色

[英]SSRS change bullet color

I've been request to change the color of the list item from black to red (our company logo color, our branding) in SSRS.我被要求在 SSRS 中将列表项的颜色从黑色更改为红色(我们公司的徽标颜色,我们的品牌)。 I've tried to replace the the我试过更换

  • by my own bullet colored and changed the placeholder in HTML mode:通过我自己的子弹着色并在 HTML 模式下更改占位符:

     =REPLACE( REPLACE( First(Fields.Description,Value, "myDatasetName"), "<li>", "<font color='#E61E3C'>•</font>     " ), "</li>" , "<br/>" )

    My bullet is now in red so that's cool....however I've lost the property of a list:我的项目符号现在是红色的,这很酷......但是我已经失去了列表的属性:

    • my long我的长
      text should appear like this文字应该是这样的

    So to have the text of the next rows being aligned with the first text row.因此,要使下一行的文本与第一行文本对齐。 However, as expected, the text is aligned with the bullet.但是,正如预期的那样,文本与项目符号对齐。 My approach is wrong as it should remain a list item to benefit of all the properties.我的方法是错误的,因为它应该保留在列表项中以利用所有属性。

    With CSS we can change the color , does anyone know how we can do it in SSRS? 使用 CSS 我们可以改变颜色,有谁知道我们如何在 SSRS 中做到这一点?

    Any help would be appreciated.任何帮助,将不胜感激。

    SQL Server version: 2019 SQL 服务器版本:2019

  • The best way I found is that I've developed my own list subreport.我发现的最好方法是开发自己的列表子报表。 This sub report is a tablix with 3 columns:此子报告是一个包含 3 列的 tablix:

    • the bullet (in red)子弹(红色)
    • a column representing spaces between bullet and content表示项目符号和内容之间的空格的列
    • the text content (in my case it's a title in uppercase + newline + a content)文本内容(在我的例子中是大写标题 + 换行符 + 内容)

    I can then change the:然后我可以更改:

    • list style type (bullet, number, hyphen,..)列表样式类型(项目符号、数字、连字符、..)
    • the color颜色
    • the size of the list style列表样式的大小
    • ... ...as I want ……如我所愿

    I've changed by SQL query to return a list of records.我已经通过 SQL 查询更改为返回记录列表。 My report has a tablix that calls my own list subReport having the necessary parameters (textItem,...)我的报告有一个 tablix,它调用我自己的列表 subReport 具有必要的参数(textItem,...)

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

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