OneReport is a Rails Engine used for generating complex report, It can export to many format, Like: csv, pdf, html, xml and more
- Easy to use, Just config;
- Separate pdf style and data;
- Strong, even data processing break off, It can be restore easily;
- sidekiq job;
- report file store;
- send email notice user after finished sidekiq job;
gem 'one_report'
rake db:migrate
this step is important, it format the report's data format
class StudentReport < ActiveRecord::Base
define_report :sports_report
end
Since the definition, there are several meaning:
- add method:
sports_report_id
, this method will get report list's id - add method:
sports_report_report_list
, this method will get report list model, for addition, It will generate a queue job;