kalenjordan / custom-reports

Custom Magento reports using SQL
http://magemail.co/free-custom-reports-module-for-magento/
Other
143 stars 65 forks source link

Ability to specify default Grid Configuration values #62

Open Judder opened 8 years ago

Judder commented 8 years ago

Would be great to give Grid Configuration the ability to have default values, so that the initial run of any report doesn't select the complete data set.

For example adding a date filter with

{"filterable": {"Created At": "adminhtml/widget_grid_column_filter_date"}}

could have something like (pseudo code)

{"filterable": {"Created At": "adminhtml/widget_grid_column_filter_date"}}
{"defaults": {"Created At":{"From":"01/05/2016","To":"01/06/2016"}}}
peterjaap commented 8 years ago

I think this it the responsibility of the query, not the grid configuration.

Judder commented 8 years ago

I agree, but I wonder how you could have a default LIMIT set on a query, and then also use the filtering from the Grid to remove this when needed

For example select everything by default, add a limit of 1000

However if a date range is set, then remove the 1000 limit