首页 > 解决方案 > Oracle BI 发布者为每组交替颜色 rtf

问题描述

我在 for-each 组中有一张桌子,我希望桌子有交替的颜色。我在 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 cannot be cast to oracle.xdo.template.fo.elements.FOBlockLevel

如何为 for each 中的备用组提供背景颜色?

谢谢

标签: oraclertfbi-publisher

解决方案


我认为这不起作用 - 见

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

据我所知,不支持块的背景颜色


推荐阅读