Last active
September 26, 2015 19:58
-
-
Save hidakatsuya/1150974 to your computer and use it in GitHub Desktop.
ThinReports Example: Basic List
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require 'rubygems' | |
require 'thinreports' | |
report = ThinReports::Report.new :layout => 'basic_list.tlf' | |
30.times do |t| | |
# Internaly #start_new_page() method is called, | |
# the page break automatically. | |
# | |
# [NOTE] In thinreports < 0.7.5: | |
# report.page.list(:default).add_row do |row| | |
# : | |
report.list.add_row do |row| | |
row.item(:detail).value("row##{t}") | |
end | |
end | |
# [NOTE] In thinreports < 0.7.7: | |
# report.generate_file 'basic_list.pdf' | |
report.generate :filename => 'basic_list.pdf' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you pointed out. I have made corrections to the basic_list.tlf.