PHP Classes
elePHPant
Icontem

PHP ODT Template SQL Reports: Generate report from MySQL data using ODT template

Recommend this page to a friend!
  Info   View files Documentation   Screenshots Screenshots   View files View files (22)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-05-08 (13 days ago) RSS 2.0 feedNot enough user ratingsTotal: 226 This week: 8All time: 7,714 This week: 104Up
Version License PHP version Categories
odtreportsql 1.4GNU Lesser Genera...5PHP 5, Databases, Printing, Templates
Description Author

This package can generate report from MySQL data using ODT template.

It can process document templates in the ODT format used by OpenOffice and replaces the template placeholder values with data from MySQL database query results.

The template engine supports variable substitution by text or even pictures, blocks to iterate over data, nested blocks, picture substitution.

Innovation Award
PHP Programming Innovation award nominee
April 2017
Nominee
Vote
Many applications need to generate reports from data retrieved from a database.

This class can generate reports from MySQL database query results using templates in the ODT format used by OpenOffice.

This allows creating report documents formatted with user defined templates and replacing placeholders with data from a database.

Manuel Lemos
Name: Marco Sillano <contact>
Classes: 1 package by
Country: Italy Italy
Age: ???
All time rank: 3806157 in Italy Italy
Week rank: 95 Up5 in Italy Italy Up
Innovation award
Innovation award
Nominee: 1x

Details
# odtReportSQL
This scalable library defines a complete reports/documents system  for php-mySQL applications.

![demo screenshot](./demo/img/2017-04-19.210908.shot.png)

Features:
-  Based on templates created using OpenOffice (.odt files)
-  Templates can be of any size (A4, A3...) and multipage.
-  On templates this system can do:
*       Simple substitution based on couples #field#/value.
*       Blocks and nested blocks duplication (any deep) or deletion.
*       Pictures substitution.
-  The HTML User Inteface is build by System and can be easy added at an existing php application. Add 2 lines ( see odtReportSQL-test.php)
*           <?php  include('odtReportSQL.php'); ?>
*           <?php  echo getReportMenu('this_page'); ?>
-  This system is DB driven, using 2 tables to define all templates substitutions and UI
-  Scalable:
*      odtphp.php defines template substitution engine
*      odtphpsql.php adds substitution queries definitions in DB
*      odtReportSQL.php adds an UI defined in DB
-  Any document as an URL definition.
-  To add a new document is only required to make the new template and to update the DB.
-  The resulting documents can be open using OpenOffice and saved in almost any format.
 
This system was developped to be used with a school examinations management software, with more than 25 different documents (letters, certificates, ufficial records, grade tables, notices...) from 1 to 68 pages.

![demo template](./demo/img/2017-04-20.075902.shot.png)![demo document](./demo/img/2017-04-20.080141.shot.png)

see install.txt.

TODO
- More translations (files language_xx.php).
- More DB Interfaces (file commonSQL.php)
Screenshots  
  • examples
  Files folder image Files  
File Role Description
Files folder imagedemo (1 file, 1 directory)
Files folder imagelib (1 file)
Files folder imagesql (2 files)
Files folder imagetemplates (1 file)
Accessible without login Plain text file commonSQL.php Aux. mysql base functions
Accessible without login Plain text file config.php Conf. db config
Accessible without login Plain text file install.txt Doc. install instructions
Accessible without login Plain text file language-en.php Aux. en messages
Accessible without login Plain text file language-it.php Aux. it messages
Accessible without login Plain text file language.php Aux. used messages
Accessible without login Plain text file LICENSE Lic. License text
Plain text file odtphp.php Class replacements engine
Plain text file odtphpsql.php Class mySQL substitutions
Plain text file odtReportSQL.php Class mySQL UI definitions
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Image file update.gif Icon button ico

  Files folder image Files  /  demo  
File Role Description
Files folder imageimg (5 files)
  Accessible without login HTML file demo.readme Doc. demo

  Files folder image Files  /  demo  /  img  
File Role Description
  Accessible without login Image file 2017-04-19.210908.shot.png Output update
  Accessible without login Image file 2017-04-20.075902.shot.png Output update
  Accessible without login Image file 2017-04-20.080141.shot.png Output update
  Accessible without login Plain text file Notice-example_A3.pdf Doc. new
  Accessible without login Plain text file Notice-template_A3.pdf Doc. new

  Files folder image Files  /  lib  
File Role Description
  Plain text file pclzip.lib.php Class required library

  Files folder image Files  /  sql  
File Role Description
  Accessible without login Plain text file odt_queries.sql Aux. SQL to create table odt_queries
  Accessible without login Plain text file odt_reports.sql Aux. SQL to create table odt_reports

  Files folder image Files  /  templates  
File Role Description
  Accessible without login HTML file reportSQL.html Data for UI

 Version Control Unique User Downloads Download Rankings  
 95%
Total:226
This week:8
All time:7,714
This week:104Up
User Comments (3)
Thats a very good class !
18 days ago (Josť Filipe Lopes Santos)
70%StarStarStarStar
Thats a very good class !
18 days ago (Josť Filipe Lopes Santos)
70%StarStarStarStar
Thats a very good class !
18 days ago (Josť Filipe Lopes Santos)
70%StarStarStarStar