-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
37 lines (29 loc) · 1.08 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
SimpleReports
=============
SimpleReports was designed to give developers complete control over the generation of their reports
while maintaining a simple interface that allows for rapid development.
SimpleReports supports output in four formats: HTML, XLS, PDF (Prawn), PDF (Latex, experimental), TXT.
Map support (i.e., Google Maps API) is built in for HTML and PDF modes.
SimpleReports is still very young, and any help as far as development or ideas are more than welcome.
TODO
=======
-Caching
-- Invalidation of cached rows
-- More complex rules for when to cache
-- Row, cell formats need to be saved, too
-Charts
-More testing
EXAMPLE
=======
table_data = [[5, "Vanilla"], [3, "Chocolate"], [7, "Strawberry"]]
table = Report::Table::Base.new(:header => ["Votes", "Flavor"], :row_data => table_data)
table.to_text
table.to_latex # raw latex output
table.to_csv
table.to_html
Or, from a view:
text_table(table)
pdf_table(pdf, table) # uses prawn, not latex
html_table(table)
xlsx_report(Report::Base.new(:table => table))
Copyright (c) 2010 Ryan Winograd, released under the MIT license