Hello Everyone,
I have nearly 13 reports in my application, the user can select
whichever report(s) he wants to view/export to DOC file.

So whenever the user selects more than 1 report, I am supposed to give a
page-break. I have solved this issue in View report (html file) with
this CSS style => "style='page-break-before:always;'".

But I am unable to do the same while Exporting it to a word document.
Here is the method which I am using,

  def export_report
    date_value = Date.today
    filename = "report_"+date_value.to_s+".doc"
    headers['Pragma'] = "public"
    headers["Content-type"] = "application/msword"
    headers['Cache-Control'] = "no-cache, must-revalidate, post-check=0,
pre-check=0"
    headers['Content-Disposition'] = "attachment;
filename=\"#{filename}\""
    headers['Expires'] = "0"
    report_content = Report.generate_report_content()
    render :text => report_content
    return false
  end

Could anyone please help me to solve this issue?

Thanks in advance,
Vasanth
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to