0.0
No commit activity in last 3 years
No release in over 3 years
A simple library that allows you to send a jrxml document, xml document, selector, and type ('pdf','xls') to generate a jaspser report.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.5.0
 Project Readme

Casper

(Still in Development Mode...)

Is a jruby library that takes a jrxml document, a xmldocument, a xpath selection string and a export type to create a pdf/xls report.

Requirements

This gem requires jruby > 1.6.0

Install

gem install casperreports

Input

  • JasperReport Template or jrxml file
  • Xml Data
  • XPath Selection
  • Export type

Process

Casper will use the JasperReports library to compile and return a pdf.

Output

A pdf/xls document in string of bytes (streaming)

Usage Examples

movie_jrxml = open('moviereport.jrxml').read
movies = open('movies.xml').read

pdf_string = Casper.new.compile(movie_jrxml, movies, '//movie', 'pdf')
open('movie.pdf', 'wb').write(pdf_string)

xls_string = Casper.new.compile(movie_jrxml, movies, '//movie', 'xls')
open('movie.pdf', 'wb').write(xla_string)