In my recent work i have face some difficulties for generating different report for different organization or client using same application,because every client have their own reporting format.
Like SAAS based application if it is generate some MIS report and if client require some more or less information depending upon his requirement we can give some editable facilities to edit and generate report.
So to fulfill this kind of requirement user editable report which contains Markup + ruby code for reporting purpose.
I am using liquid ,acts_as_flying_saucer,rchart,textile/Html for generating report.
Basic steps to achieve this functionality:
- Create generic templates that contain(Html+Liquid) used widely for all organiztion.
- After Creating generic template if client needs some customization as per their reporting format . Let us take their report format and develop their custom report template.
- Generate Report against Template , process template content and display or generate report as per need.
Short introduction of liquid
What is Liquid?
Liquid markup language.Liquid is a “safe, customer facing template language for flexible web apps”.
More info you can found http://www.liquidmarkup.org/
- Allowing user to change appearance of application without running insecure code.
- Render templates directly from the database.
More info about liquid you can found http://github.com/tobi/liquid
So to generate Report use Report Template,In Report Template content contains liquid+HTML/Textile .This content is rendered when generating report and generate report content which mostly contains HTML and Generate report based on it.
May be i can’t explain full functionality due to lack of time and content,i have just implemented code for that and hosted on github.
Any question regarding this you can write comment,or drop me a mail.