You have not given enough details on your reporting setup; so my guess would be to save the details into a new table. This would include data such as:
* id (for the record)
* user_id
* report_id
* date_time
* parameters
The "parameters" are a text field; with the criteria/parameters which created the report saved as a JSON object. That way if the report gets extended you can still retrieve at least some of the criteria from the JSON data.
You might also want to allow the allow the user to give their own Title/Name to the report so they can more easily find it again (assuming you give them a list to choose from); and perhaps the option to make it private/public, depending on your setup.
But one thing you do not want to do is save the actual data from the report!!
HTH.
On Saturday, 31 May 2014 23:41:53 UTC+2, lovesh harchandani wrote:
-- * id (for the record)
* user_id
* report_id
* date_time
* parameters
The "parameters" are a text field; with the criteria/parameters which created the report saved as a JSON object. That way if the report gets extended you can still retrieve at least some of the criteria from the JSON data.
You might also want to allow the allow the user to give their own Title/Name to the report so they can more easily find it again (assuming you give them a list to choose from); and perhaps the option to make it private/public, depending on your setup.
But one thing you do not want to do is save the actual data from the report!!
HTH.
On Saturday, 31 May 2014 23:41:53 UTC+2, lovesh harchandani wrote:
In my application a user can generate reports on multiple models using multiple criteria. I want to let the user save the queries(with the criteria). What is a good approach?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5c2290dc-4765-4a3b-9765-f89f1af7d5d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment