jasper-bridge
A bridge from RubyOnRails to Jasper.
Requires
Install
In Gemfile:
gem 'jasper-bridge'
Run ‘bundle install’ or in console ‘gem install jasper-bridge’.
Use
1.In controller class:
require 'jasper-bridge'
class ProductsController < ApplicationController
include Jasper::Bridge
...
end
2.Put jasper file in “#Rails.root/reports” directory.
3.In action of the controller, call method ‘send_doc’ to response the report. Like the example:
def index
@produtos = Produto.all
send_doc(@products.to_xml, '/products/product', 'Products.jasper', "Products", params[:output_type])
end
Jasper Lib Versions
The java libs on this gem is from JasperReports 3.7.6. So reports must be compiled in the same version.
Copyright
Copyright © 2011 paulopessoa. See LICENSE.txt for further details.