<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="StarOffice/5.1 (Win32)">
<META NAME="AUTHOR" CONTENT="Philippe Lewicki">
<META NAME="CREATED" CONTENT="20000522;5545499">
<META NAME="CHANGEDBY" CONTENT="Philippe Lewicki">
<META NAME="CHANGED" CONTENT="20000605;7091802">
<STYLE>
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm; font-size: 10pt }
H1 { margin-bottom: 0.21cm; font-family: "helvetica", sans-serif; font-size: 16pt }
H2 { margin-bottom: 0.21cm; font-family: "helvetica", sans-serif; font-size: 14pt; font-style: italic }
H3 { margin-bottom: 0.21cm; font-family: "helvetica", sans-serif; font-size: 12pt }
-->
</STYLE>
</HEAD>
<BODY>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT SIZE=4 STYLE="font-size: 16pt">Libreport
Documentation</FONT></P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT SIZE=4 STYLE="font-size: 16pt">Free
MyDB Project</FONT></P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm">Author : Philippe Lewicki</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<H1>Introduction :</H1>
<P STYLE="margin-bottom: 0cm">The classes Report, ReportTable,
ReportForm and SavedQuery are used to display the data from your
database in your web pages. <BR>You can use MyDB WebIDE to create
your Queries and setup your Reports. <BR>Then call the Report,
ReportTable and ReportForm classes in your html or php pages.</P>
<H1>Class Report</H1>
<P STYLE="margin-bottom: 0cm">This class is the base class of all the
reports classes..<BR>The report class is used to display a Report in
your web pages.
</P>
<H2>Methodes :</H2>
<P STYLE="margin-bottom: 0cm"><B>id</B> unique id in the database of
the report<BR><B>field</B> array with all the field names <BR><B>idquery
</B> unique id in the database of the query <BR><B>header</B> Header
template string of the report<BR><B>row</B> Row template string of
the report <BR><B>footer</B> Fouter template string of the
report<BR><B>recprow</B> = 0 Number of record per rows <BR><B>max_rows</B>
= 0 Numbers of rows to display <BR><B>caract </B> variable temporaire
en attendant la classe execregistry <BR><B>reg</B> Object with all
the value of the registry */<BR><B>tbl_report </B>= "report"
Name of the table with the reports<BR><B>tbl_registry </B>=
"registry" Name of the table with the registry information</P>
<H2>Proprieties</H2>
<P STYLE="margin-bottom: 0cm">Usualy its the only method you'll need
to use to display a report.<BR>For spectifics needs of for creating a
new class with a report include you will need to redo the display
proprieties using the getreport, getfields and reportfusion
proprieties.</P>
<H3>display(object mydataconnect)</H3>
<P STYLE="margin-bottom: 0cm">This method return a string with the
templates compose with the data. All ready to be displayed.</P>
<H3>getreport(object mydataconnect)</H3>
<P STYLE="margin-bottom: 0cm">Its a constructor. This proprieties get
the information in the database to initialize the report object.<BR>It
return an object with all the field of the report table.</P>
<H3>reportfusion(object mydataconnect, array row, string template)</H3>
<P>apply the registry to the row, replace the fields in the remplate
and return the newrow string.</P>
<H2>Exemple :</H2>
<P STYLE="margin-bottom: 0cm">This exemple display the report number
2<BR>// create a connection object.<BR> $conx = new mydataconnect ;</P>
<P STYLE="margin-bottom: 0cm"> $conx->db = $db ;<BR>
$conx->start(); <BR><BR>// create and display a report object<BR>
$sreport = new Report ; <BR> $sreport->id = 2; <BR> echo
$sreport->display($conx);
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<H1>Class ReportTable</H1>
<P STYLE="margin-bottom: 0cm">Its an extends of the classe Report to
display multiple records in the same row and a navigation barre.</P>
<H2>Methodes</H2>
<P STYLE="margin-bottom: 0cm">pos position of the record in the
query, usefull for the navbarr<BR>numrows Total numbers of record
result from the query */<BR>cfgNavbarr = true Display the navigation
barre in the footer must add [datanavbar]<BR>useSavedQuery = true ;
Utilisation des savedquery si c'est a false utilise parametre
dbc<BR>strPrevious = "-Précedant-" String text or
html for the previous button<BR>strStart = "Debut-" String
text or html for the begun button<BR>strEnd = "-Fin" String
text or html for the end button<BR>strNext = "-Suivant-" String
text or html for the next button<BR><BR>
</P>
<H1>Class SavedQuery</H1>
<H2>Methodes
</H2>
<P STYLE="margin-bottom: 0cm">id uniq id of the saved query in
the savedquery table<BR>table Name of the table where the query
will be done.<BR>qwhere Where clause for the query<BR>tbl_query =
"savedquery" Name of the table where the queries are
saved<BR>qname Name of the query<BR>query String with the SQL
query<BR>qorder String with Order by clause for the SQL
query<BR>qpos Position on a specific record<BR>max_rows Number
maximum of rows to display.<BR><BR>
</P>
<H2>Proprieties</H2>
<H3>getquery(object mydataconnect)</H3>
<P STYLE="margin-bottom: 0cm">This proprieties act like a constructor
for persistante SavedQuery object. It initiate the SavedQuery object
with the values in the savedquery table.<BR>Return an object with all
the field of the table as methodes.</P>
<H3>doquery(object mydataconnect)</H3>
<P STYLE="margin-bottom: 0cm">It execute a query from the SavedQuery
object. Return a result identifier.</P>
<H3>gettablefield(object mydataconnect ,boolean reportdata=false)</H3>
<P STYLE="margin-bottom: 0cm">return all the field the table in an
array.</P>
</BODY>
</HTML>