Closed TranBaVinhSon closed 5 years ago
Currently, thinreports has no feature of solving your problems. However, you may be able to solve in the following way.
First, you need to create two templates:
Then, the code looks like this:
report = Thinreports::Report.new layout: `template_a.tlf`
datas.each do |data|
report.start_new_page layout: `template_b.tlf` if report.list.overflow?
report.list.add_row do |row|
:
end
end
See also https://github.com/thinreports/thinreports-generator/tree/master/test/features/list_manually
Hope this help.
@hidakatsuya thanks man, 👍
I want to generate my pdf header (with
title
andsubtitle
) just once but How can I do it with thinreport ? This is my current codeAnd my result report.pdf
I just want
title
andsubtitle
appear at the first page. Any advice is welcomed