lib/query_report/helper.rb
def reporter(query, options={}, &block)
      @report ||= QueryReport::Report.new(params, view_context, options)
      @report.query = query
      @report.instance_eval &block
      render_report(options) unless options[:skip_rendering]
      @report
    end
def reporter(query, options={}, &block)
      @report ||= QueryReport::Report.new(params, view_context, options)
      @report.query = query
      @report.instance_eval &block
      render_report(options) unless options[:skip_rendering]
      @report
    end
Generates the reports
 @param query The base query that the reporter with start with [filters will be applied on it]
 @option options [Integer] :per_page If given then overrides the default kaminari per page option
 @option options [Boolean] :custom_view by default false, if set to true then the reporter will look for the file to render
 @option options [Boolean] :skip_rendering by default false, if set to true then the reporter will not render any thing, you will have to implement the rendering