Report Serializer Demo

Form

<%= form_tag request.fullpath, method: "get", id: "report-form", autocomplete: "off" do %> <%= ActiveReporter::Serializer::FormField.new(@report).html_fields %>


<%= submit_tag "Run report", class: "pure-button pure-button-primary" %> <% end %>

CSV


<%= link_to "Download CSV", request.query_parameters.merge(format: "csv"), class: "pure-button pure-button-primary" %>

Chart

<% table = ActiveReporter::Serializer::Table.new(@report) %>

Table

<% table.headers.each do |th| %><% end %> <% table.each_row do |row| %> <% row.each do |td| %><% end %> <% end %>
<%= table.caption %>
<%= th %>
<%= td %>
<% chart = ActiveReporter::Serializer::Highcharts.new(@report) %>