Reputation: 2736
I have a free app built on LAMP and I have created around 10 common reports for customers to be able to use - the challenge is I am increasingly being asked to create bespoke reports for customers and it is both laborious and time consuming.
Is there any way I could enable users to create their own reports via the web application? I have been looking at PHP Report Maker but it is a client install so it may help me to create these custom reports but does not directly enable a customer to create their own reports.
For example, I have table called warnings - my standard report allows the user to choose a person from the employee table and generate a standard layout report listing all the data in that table row. Users are asking me if they can choose which fields to show or if they can filter further and so on so I would like to try and give them this ability.
I would like them to be able to add their own filters based on the fields in the table, choose which fields to display and to change the layout of the report - if possible!
I don't mind paying for the feature though I don't want to pay over the odds as it is a free application.
Upvotes: 3
Views: 2457
Reputation: 681
Yes, you can do this, so long as you're comfortable with playing around in the code.
I'm building a helpdesk application where I will (eventually) give the users the ability to define their own custom settings, ie give them a page that says "What columns do you want to show when we show you the listing of open tickets". They will then be presented with all of the choices and they can check them off and order them. I will then store this information (most likely as a json object) in their user record. Every time they load the page, it will check their record to see if they have a preference and then build the SQL query off of that; if they don't, a standard query will be executed.
If you don't want then to be able to save the report, you could make a small interface that would save their settings to a $_SESSION, and then either have them reload the page or use some jquery which would reload the page, check the $_SESSION variable, modify the SQL query based on the variable and return the results to the page.
Upvotes: 1