Hy y'all. I previously thank you for your answers.
I'm making a simple report with Ruport in RoR. Rails v: 2.3.5. Ruby v: 1.8.7.
This is, practicly, mi report's code:
def setup self.data = Envio.report_table( :all, :conditions => [' id = ? ', :id ]) end
formatter :pdf do build :list do pad(10) { add_text "Hoja de Salida" } draw_table data end end
What I need to do is to use this report in the show view in my app for the envio controller. For that I've modified my controller to this:
def show pdf = EnvioReport.render_pdf send_data pdf, :type => "application/pdf", :filename => "Salida.pdf" end
And the error I'm getting is this one:
PDF Formatter requires column_names to be defined
Parameters:
{"id"=>"1"}
I've been struggling with this the last few days. Does anyone have a clue and tell me where's is my mistake?
BTW: I'm using Rails 2.3.5 only for beeing able to use streamlined plugin