【问题标题】:Show different header on first page of RTF template (BI publisher)在 RTF 模板的第一页显示不同的标题(BI 发布者)
【发布时间】:2013-09-12 17:20:50
【问题描述】:

我在为 BI 发布者创建 RTF 模板时遇到了一个问题。我在 RTF 模板的标题(不是 MS 单词标题,而是标识为 start:body 标记上方的标题)中显示一个表格。该表有 3 行,我只需要在第一页中显示其中一行,而不需要在其他页面中显示。

我没有找到任何查询页码的方法。所以,我以如下方式使用了一个标志:(这里,后缀 _f 表示 RTF 字段)。以下是我的 RTF 文件的样子:

+---------------------------------------------------------------------------------+
¦ init_f ¦    Row to be shown on all the pages     ¦                              ¦
¦--------+-----------------------------------------+------------------------------¦
¦ if_f   ¦ Row to be shown on the first page only. ¦   end_if_f change_variable_f ¦
+---------------------------------------------------------------------------------+

<?start:body?>

other stuff

<?end body?>

在哪里,

init_f

<?if: (xdoxslt:get_variable($_XDOCTX,'FLAG')!='NONFIRST')?><?xdoxslt:set_variable($_XDOCTX,'FLAG','FIRST')?><?end if?>

if_f

<?if: (xdoxslt:get_variable($_XDOCTX,'FLAG'))='FIRST'?>

end_if_f

<?end if?>

change_variable_f

<?xdoxslt:set_variable($_XDOCTX,'FLAG','NONFIRST')?>

但是,我仍然可以看到所有页面中的所有行。似乎变量'FLAG'的值没有在不同页面之间保留。对我来说,似乎只生成了一次标题,并且在所有页面中都使用了相同的标题。解决办法是什么?

【问题讨论】:

    标签: reporting rtf obiee bi-publisher


    【解决方案1】:

    创建不同的模板并如下调用它们

    <?call-template:tHEADER_VERSO?>
    <?start:body?>
    <?call-template:tHEADER_RECTO?>
    <?for-each@section:XMLELEMENT?>
    <?call-template:tDETAILS?>
    <?end for-each?>
    <?end body?>
    <?call-template:tFOOTER?>
    

    定义模板

    <?template:tDetail?>
      text content
    <?end template?>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-10-26
      • 1970-01-01
      • 1970-01-01
      • 2021-09-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多