ODT and footer

18 views
Skip to first unread message

Jbiolaz

unread,
Mar 18, 2010, 9:21:56 AM3/18/10
to Ruby Reports
Hye,

I have a template in ODT and I want to write something in the footer
of every pages. I can add it to the template, but when I process with
Ruby, the footer disappear.

I'm still using Documatic to render odt file.

here is my call to render the template:

options = Ruport::Controller::Options.new( :template_file =>
tmp_filename,
:output_file => filename_base )

Documatic::OpenDocumentText::Template.process_template(
:options => options,
:data => { 'data' => @data} )


So, is there a way to write something in the footer of an ODT using
Documatic ? and what can I do to make my code Ruport complient ?

Thanks for Help

TuxmAL

unread,
Mar 19, 2010, 4:55:38 AM3/19/10
to Ruby Reports
Hi,
With Documantic, I use the same syntax you showed on my ODT document
and footer are regularly printed:
data_footer = 'this is inserted by Ruby'
opt = Ruport::Controller::Options.new( :template_file =>

tmp_filename,
:output_file => filename_base )
Documatic::OpenDocumentText::Template.process_template(:options =>
opt,
:data => { 'ana' => anag, 'footer'=> data_footer })

Have you created the footer in your ODT doc? Have you added (and
properly formatted, eg. as "Ruby Value") into the footer the code
needed?
This is whai I have in the footer section of my ODT:
This is statically inserted in the footer:
data['data_footer'] - the end.
where:
data['data_footer']
is formatted as "Ruby Value" character style.
Hope this will Help!
Antonio Liccardo

Reply all
Reply to author
Forward
0 new messages