代码之家  ›  专栏  ›  技术社区  ›  Peanut

Jasper Reports-如何让列页脚直接显示在详细信息带下方

  •  27
  • Peanut  · 技术社区  · 14 年前

    我正在尝试让一个列页脚带区直接显示在细节带区的下方。

    细节带通常只包含2或3行,因此不应该很深。页脚始终显示在页面的下方,而不是在“详细信息”栏中内容的末尾的正下方-因此“详细信息”栏高于其包含的内容。如何让细节栏折叠到内容的末尾,以便在之后立即显示页脚。

    我确信这只是应用某些设置的一种情况-但我无法确定这些设置是什么。

    谢谢。

    5 回复  |  直到 8 年前
        1
  •  31
  •   Gordon    14 年前

    在iRead集合中 Ignore pagination 在主报表的属性中为true。

    这将导致页脚呈现在“详细信息”栏中内容的底部。

        2
  •  27
  •   Alex K    12 年前

    你可以试着设置 列页脚位置 财产。这对我来说是解决了。

    引自 JasperReports终极指南 :

    Column Footer Placement - The isFloatColumnFooter Boolean property lets users customize 
    the behavior of the column footer section. By default, this section is rendered at 
    the bottom of the page, just above the page footer. In certain cases, it is useful 
    to render it higher on the page, just below the last detail or group footer on 
    that  particular column. To do this, set the isFloatColumnFooter property to true.
    
        3
  •  13
  •   jharvalik    12 年前

    如果要保留页面格式,则报表的“浮动列页脚”属性设置优于“忽略分页”。如果忽略分页,则会缩小视图(例如PDF格式不是A4格式)。”浮动列页脚”保留页面格式。

        4
  •  2
  •   Jan Bodnar    8 年前

    对于那些不使用报告工具(Jaspersoft或旧版iReport)并直接使用XML的用户,添加 isFloatColumnFooter <jasperReport> 元素。

    <?xml version = "1.0" encoding = "UTF-8"?>
    <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN"
       "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
    
    <jasperReport xmlns = "http://jasperreports.sourceforge.net/jasperreports"
                  xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation = "http://jasperreports.sourceforge.net/jasperreports
       http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
                  isFloatColumnFooter="true"
                  name="report2" pageWidth="595" pageHeight="230" 
                  columnWidth="555" leftMargin="20" rightMargin="20"
                  topMargin="20" bottomMargin="20">
    
    ...
    </jasperReport>
    
        5
  •  1
  •   Kai Frogger    9 年前

    浮动列页脚是这里的正确设置。 如果在细节栏和te footer的输出之间仍然有空间丢失,请注意其他栏会浪费空间,就像摘要一样。如果您不需要这些带子,请将其移除或将其高度设置为0。