lib/thinreports/generator/pdf.rb in thinreports-0.7.5 vs lib/thinreports/generator/pdf.rb in thinreports-0.7.6

- old
+ new

@@ -16,11 +16,13 @@ # @param [Hash] options # @option options [Hash] :security (nil) # See Prawn::Document#encrypt_document def initialize(report, options) super - @pdf = Document.new(options, :Title => default_layout.format.report_title) + title = default_layout ? default_layout.format.report_title : nil + + @pdf = Document.new(options, :Title => title) @drawers = {} end # @see ThinReports::Generator::Base#generate def generate