Permalink
Browse files

Updated todo and readme

  • Loading branch information...
1 parent 35a07cc commit 59f6efebe478c351b3917c550a17b29e8ce19d74 Joshua Lippiner committed Jul 16, 2009
Showing with 21 additions and 1 deletion.
  1. +6 −1 TODO
  2. +15 −0 lib/dynamic_reports/reports.rb
View
7 TODO
@@ -1,5 +1,10 @@
= General
- *
+ * Figure out how to all for the creation of a single report definition file within app/reports instead of one per report
+ * Change report definition from the current to something more like
+ * report :name do
+ * report def options
+ * end
+
= Reports
* Factory Generators (for records data)
* Pdf engine option
@@ -184,6 +184,21 @@ def link(column, url, link_options=nil)
links({:column => column, :url => url, :link_options => link_options})
end
+ # Define an inline subreport for the report
+ #
+ # Pass parameters within {}. Parameters are replaced with the row values
+ # from passed records. You do NOT need to include a parameter value as a
+ # report column for it to be used in a link. For example, you might
+ # want to generate a subreport with an ID field in it but not display that id
+ # in the actual report. Just include {id} to do this.
+ #
+ # Example:
+ #
+ # subreport :visits, '/reports/{visit}/details?date={recorded_at}'
+ #
+ # The subreport should be created using the same report definition style
+ # that you use for any other report.
+ #
def subreport(column, url, link_options=nil)
link_options ||= {}
link_options.merge!({:class => 'sub_report_link'})

0 comments on commit 59f6efe

Please sign in to comment.