【问题标题】:RML - adding second page as blank oneRML - 将第二页添加为空白页
【发布时间】:2014-12-22 13:18:46
【问题描述】:

我在 rml 模板上定义了特定的图形,如下所示:

<pageTemplate id="first">
    <frame id="first" x1="15.0" y1="42.0" width="539" height="758"/>
    <pageGraphics> 
    ... graphics defined here ...
    </pageGraphics>

然后我添加story标签:

<story>
    <condPageBreak height="40cm"/> 
</story>

然后我得到两页,但第二页的图形与第一页相同。但我需要第二页只是一个空白页,没有任何图形。我怎么能这样做?

简而言之,我需要模板是两页 - 第一个定义了图形,第二个简单的空白页。 问题是,如果我访问更多页面,它只会复制所有内容(我想这是标准行为)。

【问题讨论】:

    标签: html report rml


    【解决方案1】:

    首先在模板标签中定义你想要的pageTemplate的数量

    <template pageSize="(595.0,842.0)" title="Test" allowSplitting="20">
    <pageTemplate id="first">
        <frame id="first" x1="15.0" y1="42.0" width="539" height="758"/>
        <pageGraphics> 
        ... graphics defined here ...
        </pageGraphics>
    </pageTemplate>
    <pageTemplate id="second">
    <frame id="second" x1="15.0" y1="42.0" width="539" height="758"/>
    <pageGraphics> 
        ... graphics defined here ...
        </pageGraphics>
    </pageTemplate>
    </template>
    

    然后在故事标签中添加

    <setNextTemplate name="second" />
    

    现在所有页面都将跟随第二个页面模板

    【讨论】:

      猜你喜欢
      • 2020-02-12
      • 2015-04-21
      • 1970-01-01
      • 2023-03-19
      • 1970-01-01
      • 2013-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多