每个组的 Oracle BI 发布者备用颜色 rtf

Oracle BI publisher for each group alternate colors rtf

我在 for-each 组中有一个 table,我希望 table 有不同的颜色。 我在 rtf 模板中使用以下代码片段

<?for-each-group:ROW;./INVOICE_NUMBER?> 
   <?if:xdoxslt:get_variable($_XDOCTX,'counter') mod 2=1?> <?attribute@incontext:background-color;'lightgray'?> <?end if?>

    Invoice number: INVOICE_NUMBER      Invoice  Amount: AMOUNT     


<?xdoxslt:set_variable($_XDOCTX,'counter',xdoxslt:get_variable($_XDOCTX,'counter') + 1)?>
<?end for-each-group?>

语句 <?attribute@incontext:background-color;'lightgray'?> 抛出异常 java.lang.ClassCastException: oracle.xdo.template.fo.elements.FOStaticContent 无法转换为 oracle.xdo.template.fo.elements.FOBlockLevel

如何为 for each 中的交替组设置背景颜色?

谢谢

我认为这不起作用 - 参见

https://docs.oracle.com/middleware/11119/bip/BIPRD/supp_xsl_fo.htm

据我所知,background-color 块不支持

不支持背景颜色。如果您使用的是 RTF 模板,则可以在 word 中创建一个具有备用行颜色的 table,它应该可以工作。 (我没试过)