Integrate Jasper in Rails 3
        Posted  
        
            by 
                AndreDurao
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by AndreDurao
        
        
        
        Published on 2011-06-17T16:46:01Z
        Indexed on 
            2012/11/13
            23:01 UTC
        
        
        Read the original article
        Hit count: 609
        
I'm trying to integrate a rails 3 app with jasper following this wiki:
http://wiki.rubyonrails.org/rails/pages/HowtoIntegrateJasperReports
But it seems that a lot of information isn't updated so it's been very hard to make it work by myself. I've also read a topic at ruby-forum: http://www.ruby-forum.com/topic/139453 with some details explained but still couldn't make it work.
My first problem is related with the render_to_string method: When the controller method runs I receive a "Template is missing" error:
this is the method:
def report
  @customers = Customer.all
  send_doc(render_to_string(:template => report_customers_path, :layout => false), '/pdfs', 'report.jasper', "customers", 'pdf')
end
Although this seems simple I'm not understanding why is this happening. Doesn't render_to_string with layout => false suposed to get me the string result of that action? I also tried :action instead of :template, but it does the same.
If anybody with some expertise with this integration could help... Thanks in advance, André
© Stack Overflow or respective owner