<html>
<!--        
Recurso: "$$TABLENAME$$.dynamictext"
(this contents)

Recurso: "$$TABLENAME$$.report"
{
  "type" : "dynamictext",
  "name" : "Form $$TABLENAME$$",
  "templateName" : "dynamictext"
}
-->     
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title><%=$REPORT.getName()%></title>
  <style>
* { 
  font-family: "Sans"; 
}
@page {
  size: A4 portrait;
  margin-top: 15mm;
  margin-bottom: 15mm;

  @top-center {
    content: element(top-center);
    padding: 1mm; border: 1px solid white; 
    vertical-align: bottom;
    /* background: #eeeeee; */
  }

  @bottom-center {
    content: element(bottom-center);
    padding: 1mm; border: 1px solid white; 
    vertical-align: top;
    /* background: #eeeeee; */
  }
}

.top-center {
  position: running(top-center);
}
.bottom-center { 
  position: running(bottom-center);
}
.page-number::after  {   
  content: counter(page);
}

.vspace1 {
  height: 4px;
}

</style>
</head>
<body>
    <%
    ROWCOUNT := 1;
    FOR ROW in $REPORT.rows()
    LOOP
        IF ROWCOUNT > 1 THEN
            %>
    <p style="page-break-after: always;">&nbsp;</p>
            <%
        END IF;
        ROWCOUNT := ROWCOUNT + 1;
    %>
    <div class="top-center">
        <table width="100%" cellspacing="0" cellpadding="0" border="0">
           <tr>
              <td><%=$REPORT.getName()%></td>
              <td style="text-align: right; font-size: xx-small">Page <span class="page-number"/></td>
           </tr>
        </table>
    </div>
    <div class="bottom-center">
        <hr/>
        <table width="100%" cellspacing="0" cellpadding="0" border="0">
           <tr>
              <td><%=CURRENT_DATE()%></td>
              <td style="text-align: right; font-size: xx-small">Page <span class="page-number"/></td>
           </tr>
        </table>
    </div>

