如何使用 RTF 根据 BI Publisher 中的特定单词过滤值

How to filter value based on specific word in BI Publisher using RTF

如何根据单词筛选属性输出。例如

<?Store_Location?> --> 我只想展示纽约的商店

尝试了 <?if:Store_location Contains ('NY')?> 但它不起作用。

谢谢

您使用了错误的语法。试试这个:

<?if:contains(Store_location,'NY')?>

示例XML

<record_set>
<record>
<rownum>1</rownum>
<transaction_id>111</transaction_id>
<amount>200</amount>
</record>
<record>
<rownum>2</rownum>
<transaction_id>222</transaction_id>
<amount>300</amount>
</record>
<record>
<rownum>3</rownum>
<transaction_id>333</transaction_id>
<amount>430</amount>
</record>
<record>
<rownum>4</rownum>
<transaction_id>444</transaction_id>
<amount>200</amount>
</record>
</record_set>

示例 RTF

<?for-each:record_set?>
<?for-each:record?>
<?if:contains(amount,'3')?>
Transaction ID: <?transaction_id?>
Amount:<?amount?>
<?end if?>
<?end for each?> 
<?end for each?>