Package org.wicketstuff.jasperreports

Examples of org.wicketstuff.jasperreports.JRResource


    ServletContext context = ((WebApplication) getApplication()).getServletContext();
    final File reportFile = new File(context.getRealPath("/reports/WebappReport.jasper"));

    final Map parameters = new HashMap();
    parameters.put("BaseDir", new File(context.getRealPath("/reports")));
    JRResource pdfResource = new JRPdfResource(reportFile).setReportParameters(parameters).setReportDataSource(new WebappDataSource());
    add(new EmbeddedJRReport("report", pdfResource));
  }
View Full Code Here


    ServletContext context = ((WebApplication)getApplication()).getServletContext();
    final File reportFile = new File(context.getRealPath("/reports/WebappReport.jasper"));

    final Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("BaseDir", new File(context.getRealPath("/reports")));
    JRResource pdfResource = new JRConcreteResource<PdfResourceHandler>(reportFile,
      new PdfResourceHandler()).setReportParameters(parameters).setReportDataSource(
      new WebappDataSource());
    add(new EmbeddedJRReport("report", pdfResource));
  }
View Full Code Here

    final File reportFile = new File(context.getRealPath("/reports/WebappReport.jasper"));

    final Map<String, Object> parameters = new HashMap<String, Object>();
    parameters.put("BaseDir", new File(context.getRealPath("/reports")));

    JRResource pdfResource = new JRConcreteResource<PdfResourceHandler>(reportFile,
      new PdfResourceHandler()).setReportParameters(parameters).setReportDataSource(
      new WebappDataSource());
    add(new ResourceLink<Void>("linkToPdf", pdfResource));

    JRResource rtfResource = new JRConcreteResource<RtfResourceHandler>(reportFile,
      new RtfResourceHandler()).setReportParameters(parameters).setReportDataSource(
      new WebappDataSource());
    add(new ResourceLink<Void>("linkToRtf", rtfResource));

    JRResource htmlResource = new JRConcreteResource<HtmlResourceHandler>(reportFile,
      new HtmlResourceHandler()).setReportParameters(parameters).setReportDataSource(
      new WebappDataSource());
    add(new ResourceLink<Void>("linkToHtml", htmlResource));

    JRResource textResource = new JRConcreteResource<TextResourceHandler>(reportFile,
      new TextResourceHandler()).setReportParameters(parameters).setReportDataSource(
      new WebappDataSource());
    add(new ResourceLink<Void>("linkToText", textResource));

    JRResource imageResource = new JRImageResource(reportFile).setReportParameters(parameters)
      .setReportDataSource(new WebappDataSource());
    add(new ResourceLink<Void>("linkToImage", imageResource));

    JRResource csvResource = new JRConcreteResource<CsvResourceHandler>(reportFile,
      new CsvResourceHandler()).setReportParameters(parameters).setReportDataSource(
      new WebappDataSource());
    add(new ResourceLink<Void>("linkToCsv", csvResource));
  }
View Full Code Here

TOP

Related Classes of org.wicketstuff.jasperreports.JRResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.