oracle - 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 中的备用组提供背景颜色?
谢谢
解决方案
推荐阅读
- javascript - HTML5 选择多个高度以适应内容
- java - 更改 JFrame 的默认布局不起作用?
- spring-boot - Flyway迁移和休眠上下文,执行顺序
- c# - unity根据其他物体角度旋转物体
- python - 无监督人口分类
- javascript - 如何使用 SpServices 将新字段添加到共享点列表
- angular - 如何在 Angular 7 中同步模板上的变量值?
- angular - 如何使用 keyup 和 debouncer rxjs?
- python - 我的 Django 重定向功能不起作用
- android - Google Play 游戏不适用于在 PlayStore 中发布的应用