2017 © Pedro Peláez
 

library bootstrap-reports-bundle

A Symfony (2 & 3) Bundle for displaying reports from any data source, including SQL and MongoDB

image

eidsonator/bootstrap-reports-bundle

A Symfony (2 & 3) Bundle for displaying reports from any data source, including SQL and MongoDB

  • Friday, April 8, 2016
  • by eidsonator
  • Repository
  • 1 Watchers
  • 0 Stars
  • 35 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Bootstrap Reports Bundle

Now works with Symfony2.x and Symfony3.x, (*1)

A Symfony bundle for managing and displaying nice looking, exportable reports from any data source, including SQL and MongoDB., (*2)

Major features include:, (*3)

  • Display a report from any data source that can output tabular data (SQL, MongoDB, PHP, etc.)
  • Output reports in HTML, XML, CSV, JSON, or your own custom format
  • Add customizable parameters to a report (e.g. start date and end date)
  • Add graphs and charts with the Google Data Visualization API
  • Supports multiple database environments (e.g. Production, Staging, and Dev)
  • Fully extendable and customizable

Installation & Documentation

Installation & Documentation can be found in /Resources/doc/, (*4)

Reporting an issue or a feature request

Issues and feature requests can be submitted to the Github issue tracker., (*5)

Basic Introduction

Reports are organized and grouped in directories. Each report is it's own file., (*6)

A report consists of headers containing meta-data (e.g. name and description) and the actual report (SQL queries, javascript, or PHP code)., (*7)

All reports return rows of data which are then displayed in a sortable/searchable HTML table., (*8)

Reports can be exported to a number of formats including CSV, XLS, JSON, and XML., (*9)

The Php Reports framework ties together all these different report types, output formats, and meta-data into a consistent interface., (*10)

Example Reports

Here's an example SQL report:, (*11)

-- Products That Cost At Least $X
-- VARIABLE: {"name": "min_price"}

SELECT Name, Price FROM Products WHERE Price > "{{min_price}}"

The set of SQL comments at the top are the report headers. The first row is always the report name., (*12)

The VARIABLE header tells the report framework to prompt the user for a value before running the report. Once provided it will be passed into the report body ("{{min_price}}" in this example) and executed., (*13)

Here's a MongoDB report:, (*14)

// List of All Foods
// MONGODATABASE: MyDatabase
// VARIABLE: {
//   "name": "include_inactive", 
//   "display": "Include Inactive?", 
//   "type": "select",
//   "options": ["yes","no"]
// }

var query = {'type': 'food'};

if(include_inactive == 'no') {
    query.status = 'active';
}

var result = db.Products.find(query);

printjson(result);

As you can see, the structure is very similar. MongoDB reports use javascript style comments for the headers, but everything else remains the same., (*15)

The MONGODATABASE header, if specified, will populate the 'db' variable., (*16)

Here's a PHP Report:, (*17)

 100 || $count  $count));

$rows = array();
foreach($charges as $charge) {
    $rows[] = array(
        'Charge Id'=>$charge->id,
        'Amount'=>number_format($charge->amount/100,2),
        'Date'=>date('Y-m-d',$charge->created)
    );
}

echo json_encode($rows);
?>

Again, the header format is very similar., (*18)

The INCLUDE header includes another report within the running one. Below is example content of /stripe.php:, (*19)


The Versions

08/04 2016

dev-master

9999999-dev

A Symfony (2 & 3) Bundle for displaying reports from any data source, including SQL and MongoDB

  Sources   Download

LGPL-3.0+

The Requires

 

mongodb database sql csv bootstrap symfony reports reporting

08/04 2016

v0.2.0

0.2.0.0

A Symfony (2 & 3) Bundle for displaying reports from any data source, including SQL and MongoDB

  Sources   Download

LGPL-3.0+

The Requires

 

mongodb database sql csv bootstrap symfony reports reporting

17/03 2016

v0.1.1.x-dev

0.1.1.9999999-dev

A Symfony2 Bundle for displaying reports from any data source, including SQL and MongoDB

  Sources   Download

LGPL-3.0+

The Requires

 

mongodb database sql csv bootstrap symfony reports reporting

17/03 2016

v0.1.1

0.1.1.0

A Symfony2 Bundle for displaying reports from any data source, including SQL and MongoDB

  Sources   Download

LGPL-3.0+

The Requires

 

mongodb database sql csv bootstrap symfony reports reporting

17/03 2016

v0.1.0.x-dev

0.1.0.9999999-dev

A Symfony2 Bundle for displaying reports from any data source, including SQL and MongoDB

  Sources   Download

LGPL-3.0+

The Requires

 

mongodb database sql csv bootstrap symfony reports reporting