【发布时间】:2020-04-20 18:23:12
【问题描述】:
当值包含“x”时,我试图在表达式中使多个值“粗体”。 Html 占位符属性不符合我的需要,我正在努力让它与以下内容一起使用,因为我的表达式中有多个语句:
=(IIF(Fields!Test1.Value="x", "Bold", "Normal") OR (Fields!Test2.Value="x", "Bold", "Normal") 等等
我想我需要创建一个自定义代码函数,然后在表达式中需要的地方调用该函数,但我不知道从哪里开始!任何帮助将不胜感激。
更新:
Switch 正在工作,但将整个表达式加粗,而不仅仅是在表达式的占位符属性中指定的值。我相信这是因为我的主要表达式连接了创建一个长字符串的字段。
+-----------+------------+-----------+------------------+------------------+-----------+-----------+------------+-----------+-------------------+---------+--------------+-----------+----------------+-------------------------------+-----------------+---------------+--------------+----------+------------------+------------------+------------------+------------------+------------+---+------------+-----------+-------------------+-----------+--------------+-----------+----------------+---------+----------+-------------------+----------------------+---------------+----------------+---------+
| id_number | first_name | last_name | pref_address_ind | h_addr_type_code | h_care_of | h_street1 | h_street2 | h_street3 | h_foreign_cityzip | h_city | h_state_code | h_zipcode | h_country_code | h_email_address | p_email_address | h_phone | | hc_phone | b_company_name_1 | b_company_name_2 | b_business_title | fld_of_work_code | b_street1 | | b_street2 | b_street3 | b_foreign_cityzip | b_city | b_state_code | b_zipcode | b_country_code | b_phone | bc_phone | b_email_address | | full_business | pref_email_ind | Main_ID |
+-----------+------------+-----------+------------------+------------------+-----------+-----------+------------+-----------+-------------------+---------+--------------+-----------+----------------+-------------------------------+-----------------+---------------+--------------+----------+------------------+------------------+------------------+------------------+------------+---+------------+-----------+-------------------+-----------+--------------+-----------+----------------+---------+----------+-------------------+----------------------+---------------+----------------+---------+
| 165815 | Test | Test1 | NULL | | NULL | NULL | x Apt #09 | NULL | NULL | NULL | NULL | NULL | x USA | NULL | NULL | DELETED | | DELETED | NULL | ~ | NULL | NULL | NULL | | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | | NULL | NULL | 165815 |
| 165816 | Test | Test2 | NULL | | NULL | Street | x Street 1 | x Street2 | NULL | Houston | NULL | NULL | NULL | x Home Email:testing@test.com | NULL | x Home Phone: | 111-111-1111 | NULL | NULL | ~ | NULL | NULL | x Business | 1 | x Street 2 | NULL | NULL | x Houston | x TX | x 77777 | NULL | NULL | NULL | x Business Email: | btesting@testing.com | NULL | NULL | 165816 |
+-----------+------------+-----------+------------------+------------------+-----------+-----------+------------+-----------+-------------------+---------+--------------+-----------+----------------+-------------------------------+-----------------+---------------+--------------+----------+------------------+------------------+------------------+------------------+------------+---+------------+-----------+-------------------+-----------+--------------+-----------+----------------+---------+----------+-------------------+----------------------+---------------+----------------+---------+
【问题讨论】:
标签: reporting-services substring ssrs-2012 string-concatenation ssrs-expression