Skip to content
jdorn edited this page Jul 6, 2012 · 13 revisions

Php Reports

A light weight, extendable, PHP reporting framework for managing and displaying nice looking, exportable reports from any data source, including SQL and MongoDB

Major features include:

  • 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)
  • Sort and filter the data in reports instantly without refreshing
  • Support for graphs and charts with the Google Data Visualization API
  • Easily switch between database environments (e.g. Production, Staging, and Dev)
  • Group reports into folders and use the real-time search to find what you're looking for
  • Fully extendable and customizable

Introduction

Reports are organized and grouped in directories. Each report is it's own file.

A report consists of headers containing meta-data (e.g. name, description, column formatting, etc.) and the actual report (SQL statements, MongoDB js file, PHP code, etc.).

All reports return rows of data which are then outputted in the specified format (HTML, CSV, etc.).

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

Example Report

Here's an short example of a SQL report:

-- My Report
-- This lists all the products that cost
-- more than a given price.
-- VARIABLE: min_price, Minimum 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. After that comes a description. Following that are any parameters or options.

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

Learn More

Clone this wiki locally