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

Recommend this page to a friend!
  Info   Documentation   Screenshots   View files (23)   Download .zip   Reputation   Support forum (5)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-02-09 (5 months ago) 70%Total: 389 This week: 1All time: 6,535 This week: 255
Version License PHP version Categories
odtreportsql 1.5GNU 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.


generate pdf with php
i need to generate a pdf from php and mysql

Generate Report
I need a php class that will output a pdf or excel document r

Innovation Award
PHP Programming Innovation award nominee
April 2017
Number 2
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
Picture of Marco Sillano
  Performance   Level  
Name: Marco Sillano <contact>
Classes: 4 packages by
Country: Italy Italy
Age: ???
All time rank: 219385 in Italy Italy
Week rank: 61 2 in Italy Italy
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

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

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

-  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.

- More translations (files language_xx.php).
- More DB Interfaces (file commonSQL.php)
  • examples
File Role Description
demo (1 file, 1 directory)
lib (1 file)
sql (2 files)
templates (1 file)
commonSQL.php Aux. mysql base functions
common_pdo.php Aux. Update for commonSQL (obsolete)
config.php Conf. db config
install.txt Doc. install instructions
language-en.php Aux. en messages
language-it.php Aux. it messages
language.php Aux. used messages
LICENSE Lic. License text
odtphp.php Class replacements engine
odtphpsql.php Class mySQL substitutions
odtReportSQL.php Class mySQL UI definitions Doc. Documentation
update.gif Icon button ico

  Files  /  demo  
File Role Description
img (5 files)
   demo.readme Doc. demo

  Files  /  demo  /  img  
File Role Description
   2017-04-19.210908.shot.png Output update
   2017-04-20.075902.shot.png Output update
   2017-04-20.080141.shot.png Output update
   Notice-example_A3.pdf Doc. new
   Notice-template_A3.pdf Doc. new

  Files  /  lib  
File Role Description
   pclzip.lib.php Class required library

  Files  /  sql  
File Role Description
   odt_queries.sql Aux. SQL to create table odt_queries
   odt_reports.sql Aux. SQL to create table odt_reports

  Files  /  templates  
File Role Description
   reportSQL.html Data for UI

 Version Control Unique User Downloads Download Rankings  
This week:1
All time:6,535
This week:255
User Ratings User Comments (3)
 All time
Thats a very good class !
3 years ago (Josť Filipe Lopes Santos)
Thats a very good class !
3 years ago (Josť Filipe Lopes Santos)
Thats a very good class !
3 years ago (Josť Filipe Lopes Santos)

For more information send a message to info at phpclasses dot org.