您的位置:首页 > 其它

直接调用iReport生成的jrxml文件生成报表

2007-02-26 16:01 621 查看
public class JasperReportsIntro

{

 public static void main(String[] args)

 {

    JasperReport jasperReport;

    JasperPrint jasperPrint;

    try

    {

      jasperReport = JasperCompileManager.compileReport(
          "reports/jasperreports_demo.jrxml");
      jasperPrint = JasperFillManager.fillReport(
          jasperReport, new HashMap(), new JREmptyDataSource());
      JasperExportManager.exportReportToPdfFile(
          jasperPrint, "reports/simple_report.pdf");


    }

    catch (JRException e)

    {

      e.printStackTrace();

    }

 }

}

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  hashmap string 报表 class
相关文章推荐