Dynamic Reports Generation in laravel
Asked Answered
N

4

8

I'm trying to develop a custom reports generation for my application, in which the user will dynamically input the model and its related model.And will select the related columns for which the report is needed and will have conditional statements for 'AND' and 'OR' conditions.

The same functionality is done is vtiger ,Zoho CRM and sales force .

My doubt is which is the efficient way of doing it.

1.Either by creating tables for each modules and defining its column in database 2.Or by providing a config file for all the set up 3.Or by creating a model class for all reports and defining its related model attributes and binding data using getter and setter(accessors and mutators). 4.Or suggest me any other preferrable method or any packages with have minimal functionalities relating this

I know is complex but please suggest me few hints from your point of view.

Please find the below for the flow. enter image description here enter image description here

Ninepins answered 5/11, 2015 at 11:5 Comment(1)
I would also be very interested in this. I have looked to see if their are packages for this and their are not.Harter
D
7

you can use a Querybuilder to generate queries by users themselves. then use something similar to JSReport to allow users to design reports. There are very good web report designers out there, but most of them are for a price. if you still wanna make your own, refer these; Seal reports JSReports for reference what you looking for is real ;-)

use JQueryQueryBuilder and customize according to your need. use Laravel Boilerplate or something to start-off with. use Handlebars.js / Mustache.js or Blade as the template engine. be creative...

cheers!!!

Disjunctive answered 6/7, 2017 at 6:36 Comment(0)
T
2

For similar requirement, I have come across Reportico

Though I have not started implementing it yet, but it seems really nice.

They have Laravel module as well, supporting Laravel 5.1

Seems the team keeps the thing updated.

Although their UI is not good, they have got report builder as well.

Their Github link: https://github.com/reportico-web/

Taddeo answered 3/8, 2016 at 12:35 Comment(0)
Z
1

Although not a complete solution, I think this can help you on your way to creating your own:

  1. You can get all your tables from your DB dynamically:

    DB::select('SHOW TABLES');

  2. You can get column names for tables as well:

    Schema::getColumnListing('users');

  3. Try an find a way to get related tables to the one the users selects.

  4. get intended query from user form. ( with conditions and value )

  5. profit.

Zingg answered 6/4, 2016 at 1:53 Comment(0)
T
0

If you're looking to dynamically generate reports in Laravel with an intuitive drag-and-drop interface for selecting table columns and joining multiple tables, you might want to check out the package I recently developed: Laravel Dynamic Report Generator

This package provides a user-friendly interface that allows you to:

  • Drag and drop table columns
  • Join multiple tables
  • Generate dynamic SQL queries
  • View and paginate query results
Toothy answered 1/6 at 18:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.