首页 > 解决方案 > BI Publisher RTF 模板中的独立 ELSE

问题描述

我知道XML Publisher RTF Templates 中有一个 IF-ELSE 语句,如下所示:

<?xdofx:if ELEMENT1='A' then 'The Letter is A' else 'The Letter is not A' end if?>

但是,我希望使用该IF语句根据值显示不同的数据表。类似于下面的伪代码:

IF BUSINESS_GROUP IS BG-A THEN SHOW TABLE with COLUMNS A B and C, IF NOT, then SHOW TABLE with COLUMNS X Y and Z

我可以通过使用 2 个单独的 IF 语句来做到这一点:

<?xdofx:if BUSINESS_GROUP='A'> SHOW TABLE with COLUMNS A B and C <?end if?>

<?xdofx:if BUSINESS_GROUP!='A'> SHOW TABLE with COLUMNS X Y and Z <?end if?>

我希望我可以使用这样的语句,<?ELSE?>但它不起作用。

有小费吗?

标签: oraclertfobieebi-publisher

解决方案


你是对的,没有独立的“其他”块。根据您的要求,您将需要使用 to if 表达式评估相反的条件。

下面列出了可以在 BIP 中使用 if 表达式的所有不同方式。


推荐阅读