这是我的代码

static Connection connHealthInfoSystem = DBConnection.conn("health_info_system");
public static void printDisplayable(String reportPath, Map parameter) {
    JasperDesign jd;
    try {
        jd = JRXmlLoader.load(reportPath);
        JasperReport jr = JasperCompileManager.compileReport(jd);
        JasperPrint jp = JasperFillManager.fillReport(jr, parameter, connHealthInfoSystem);
        JasperViewer.viewReport(jp, false);
    } catch (JRException ex) {
        Logger.getLogger(JasperPrinting.class.getName()).log(Level.SEVERE, null, ex);
    }
}


根据当前的代码,如何在弹出报告时增加报告宽度?

最佳答案

jd.setPageWidth(999);之前尝试JasperCompileManager.compileReport(jd);

10-06 12:40