Report abuse


			
class SampleInvoiceReport < Ruport::Report

  include Invoice

  #optional
  prepare { self.file = "foob.pdf" }

  #mandatory
  generate {
    render_invoice do |i|
      i.company_info  = "dsfhdfhdfhsdfhsdfdfhs"
      i.customer_info = "hdfsdfh ddf dfhs sdfhdfhs "
      i.order_info = "Period 2007.02.16 - 2006.02.28\n\nSSN: xxx-xx-xxxx"
      i.data = [["Development","1.5","3000.00"],
                ["Research and Documentation","---","3000.00"]
               ].to_table %w[task hours rate]
      i.comments = "                             1.5 hours @ 3000.0/hr : $4500.00"
      #i.active_plugin.paper = "A4"
    end
  }


end