Jasper reports 默认的页面方向是什么?

Jasper reports 默认的页面方向是什么?,jasper-reports,Jasper Reports,我已经看到,如果选择了Ignore Pagination,则在JasperReports的单个页面中显示整个文档。例如,若有5000行,若选择了“忽略分页”,则会在报告的单个页面中显示 现在,当我们使用前端Java打印时,JasperReports引擎默认是横向还是纵向打印 如果打印页面时选择了忽略分页,是否有任何默认格式(纵向或横向)?纵向方向为默认方向。它不依赖于ignorePagination属性 关于默认方向的事实 1) 它在jasperreport.xsd文件中设置为默认值 Jaspe

我已经看到,如果选择了Ignore Pagination,则在JasperReports的单个页面中显示整个文档。例如,若有5000行,若选择了“忽略分页”,则会在报告的单个页面中显示

现在,当我们使用前端Java打印时,JasperReports引擎默认是横向还是纵向打印

如果打印页面时选择了忽略分页,是否有任何默认格式(纵向或横向)?

纵向方向为默认方向。它不依赖于ignorePagination属性

关于默认方向的事实 1) 它在jasperreport.xsd文件中设置为默认值

JasperReports 6.2.0版本的jasperreport.xsd中的代码片段:

3) 如果我们谈论导出为xls格式,我们可以在net.sf.jasperreports.engine.export.JRXlsExporter类中找到这段代码:

4) 如果我们谈论导出为pdf格式,我们可以在net.sf.jasperreports.engine.export.JRPdfExporter类中找到这段代码:

默认情况下,纵向方向。它不依赖于ignorePagination属性

关于默认方向的事实 1) 它在jasperreport.xsd文件中设置为默认值

JasperReports 6.2.0版本的jasperreport.xsd中的代码片段:

3) 如果我们谈论导出为xls格式,我们可以在net.sf.jasperreports.engine.export.JRXlsExporter类中找到这段代码:

4) 如果我们谈论导出为pdf格式,我们可以在net.sf.jasperreports.engine.export.JRPdfExporter类中找到这段代码:


谢谢你的解释谢谢你的解释
   <attribute name="orientation" use="optional" default="Portrait">
    <annotation>
        <documentation>Page printing orientation.</documentation>
    </annotation>
    <simpleType>
     <restriction base="string">
      <enumeration value="Portrait">
        <annotation>
            <documentation>Portrait page layout.</documentation>
        </annotation>
      </enumeration>
      <enumeration value="Landscape">
        <annotation>
            <documentation>Landscape page layout.</documentation>
        </annotation>
      </enumeration>
     </restriction>
    </simpleType>
   </attribute>
protected OrientationEnum orientationValue = OrientationEnum.PORTRAIT;
protected WhenNoDataTypeEnum whenNoDataTypeValue = WhenNoDataTypeEnum.NO_PAGES;
protected SectionTypeEnum sectionType = SectionTypeEnum.BAND;
protected void createSheet(CutsInfo xCuts, SheetInfo sheetInfo) {
    sheet = workbook.createSheet(sheetInfo.sheetName);
    patriarch = sheet.createDrawingPatriarch();
    HSSFPrintSetup printSetup = sheet.getPrintSetup();
    printSetup.setLandscape(pageFormat.getOrientation() == OrientationEnum.LANDSCAPE);
protected void setPageSize(JRPrintPage page) throws JRException, DocumentException, IOException {

//  some piece of code is omitted
    Rectangle pageSize;
    switch (pageFormat.getOrientation()) {
    case LANDSCAPE:
        // using rotate to indicate landscape page
        pageSize = new Rectangle(pageHeight, pageWidth).rotate();
        break;
    default:
        pageSize = new Rectangle(pageWidth, pageHeight);
        break;
    }
    document.setPageSize(pageSize);
}