diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
commit | 8362bf63dea22bbf6736609b0f49c152f975eb63 (patch) | |
tree | 0eea3928e39e50fae91d4e68b21b1e6cbae25604 /doc/kugar | |
download | koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip |
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'doc/kugar')
25 files changed, 4654 insertions, 0 deletions
diff --git a/doc/kugar/Makefile.am b/doc/kugar/Makefile.am new file mode 100644 index 00000000..e786da56 --- /dev/null +++ b/doc/kugar/Makefile.am @@ -0,0 +1,3 @@ + +KDE_LANG = en +KDE_DOCS = AUTO diff --git a/doc/kugar/add_detail.png b/doc/kugar/add_detail.png Binary files differnew file mode 100644 index 00000000..852d7361 --- /dev/null +++ b/doc/kugar/add_detail.png diff --git a/doc/kugar/add_detail_footer.png b/doc/kugar/add_detail_footer.png Binary files differnew file mode 100644 index 00000000..2db8829c --- /dev/null +++ b/doc/kugar/add_detail_footer.png diff --git a/doc/kugar/add_detail_header.png b/doc/kugar/add_detail_header.png Binary files differnew file mode 100644 index 00000000..44cbc570 --- /dev/null +++ b/doc/kugar/add_detail_header.png diff --git a/doc/kugar/datadtd.docbook b/doc/kugar/datadtd.docbook new file mode 100644 index 00000000..d393e1b8 --- /dev/null +++ b/doc/kugar/datadtd.docbook @@ -0,0 +1,46 @@ +<!-- To validate this document separately, uncomment this prolog +<?xml version="1.0" ?> +<!DOCTYPE appendix PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd"> +--> + +<sect1 id="kugardata-dtd"> +<sect1info> +<authorgroup> +<author> +<firstname>Alexander</firstname> +<surname>Dymo</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<author> +<firstname>Phil</firstname> +<surname>Thompson</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> +</sect1info> +<title><sgmltag class="element">KugarData</sgmltag> Document Type +Definition</title> + +<synopsis> +<?xml version="1.0" encoding="UTF-8"?> + +<!DOCTYPE KugarData [ + <!ELEMENT <link linkend="kugar-data-element">KugarData</link> (<link linkend="row-element">Row</link>*)> + <!ATTLIST KugarData + <link linkend="template-att">Template</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="row-element">Row</link> EMPTY> + <!ATTLIST Row + <link linkend="level-att">level</link> CDATA #REQUIRED + <link linkend="column-att">col1</link> CDATA #IMPLIED + <link linkend="column-att">col2</link> CDATA #IMPLIED + <link linkend="column-att">...</link> CDATA #IMPLIED + <link linkend="column-att">coln</link> CDATA #IMPLIED> + ]> +</synopsis> +</sect1> diff --git a/doc/kugar/dataref.docbook b/doc/kugar/dataref.docbook new file mode 100644 index 00000000..30f56ec3 --- /dev/null +++ b/doc/kugar/dataref.docbook @@ -0,0 +1,130 @@ +<!-- if you want to validate this file separately, uncomment this prolog: + +<?xml version="1.0" ?> +<!DOCTYPE chapter PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd"> + +--> + +<sect1 id="kugardata-element"> +<sect1info> +<authorgroup> +<author> +<firstname>Alexander</firstname> +<surname>Dymo</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<author> +<firstname>Phil</firstname> +<surname>Thompson</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> +</sect1info> +<title><sgmltag class="element">KugarData element</sgmltag></title> + +<para> +The <sgmltag class="element">KugarData</sgmltag> element defines a +report's data source. The basic structure is a collection of rows and +columns. This document does not define data types and their attributes. +<!--at this time. -->The report template defines column data type information. +</para> + +<para> +The document creator can apply an &XSL; style sheet to an existing +document to convert it to this format. If &XSL; is used, the creator +can apply custom macros using &XSL; for column calculations, sorting, +&etc;. +</para> + +<synopsis> +<!ELEMENT KugarData (Row*)> +<!ATTLIST KugarData + Template CDATA #REQUIRED> + +<!ELEMENT Row EMPTY> +<!ATTLIST Row + level CDATA #REQUIRED + col1 CDATA #IMPLIED + col2 CDATA #IMPLIED + ... CDATA #IMPLIED + coln CDATA #IMPLIED> +</synopsis> + + +<sect2 id="kugar-data-element"> +<title>Kugar data element</title> +<para> +The <sgmltag class="element">KugarData</sgmltag> element contains zero +or more <sgmltag class="element">Row</sgmltag> elements. A <sgmltag +class="element">Row</sgmltag> must contain one <sgmltag class="attribute">level</sgmltag> +attribute with a value corresponding to detail level in the template. Other attributes +represent data columns. +</para> +<para> +<anchor id="template-att"/>The value of the <sgmltag class="attribute">Template</sgmltag> +attribute is the &URL; of the report template +used to format the data. +</para> +<!-- +<variablelist> +<varlistentry id="template-att"> +<term><sgmltag class="attribute">Template</sgmltag></term> +<listitem> +<para> +This is an attribute of the <sgmltag class="element">KugarData</sgmltag> +element. The value of the attribute is the &URL; of the report template +used to format the data. +</para> +</listitem> +</varlistentry> +--> +</sect2> + +<sect2 id="row-element"> +<title>Row element</title> + +<variablelist> + +<varlistentry> +<term>Attributes</term> +<listitem> + +<variablelist> + +<varlistentry> +<term><anchor id="level-att"/><sgmltag class="attribute">level</sgmltag></term> +<listitem> +<para> +The attribute value indicates which detail in the report template +is used to display data. Rows can contain various column sets for various levels, +so any attribute except <sgmltag class="attribute">level</sgmltag> should +be stated as #IMPLIED. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="column-att"/><sgmltag class="attribute">column</sgmltag></term> +<listitem> +<para> +The name of the attribute is the column name, and uses the format as given +in the <sgmltag class="element">KugarData</sgmltag> definition. +The attribute name is used in the report template to bind the data to the +report fields. +</para> +</listitem> +</varlistentry> +</variablelist> +</listitem> +</varlistentry> +</variablelist> + +</sect2> + +</sect1> + diff --git a/doc/kugar/designer.docbook b/doc/kugar/designer.docbook new file mode 100644 index 00000000..34195ca3 --- /dev/null +++ b/doc/kugar/designer.docbook @@ -0,0 +1,364 @@ +<!-- If you want to validate or edit this document separately, uncomment +this prolog + +<?xml version="1.0" ?> +<!DOCTYPE chapter PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd"> + +--> +<chapter id="designer-manual"> +<chapterinfo> +<authorgroup> +<author> +<firstname>Alexander</firstname> +<surname>Dymo</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<author> +<firstname>Phil</firstname> +<surname>Thompson</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> +</chapterinfo> +<title>Report Template Designer Manual</title> + +<para>&kudesigner; allows interactive creation and modification of +report templates, and placement of report sections and section items onto a +report.</para> + +<para> &kudesigner; is a <acronym>WYSIWYG</acronym> +application. <guilabel>Report page size</guilabel> defines the report +dimensions on the screen. At the present moment, the scale is set +to 100% automatically and cannot be changed.</para> + +<itemizedlist> +<title>Every report template may contain the following report sections:</title> +<listitem><para>Report Header</para></listitem> +<listitem><para>Page Header</para></listitem> +<listitem><para>Detail Header</para></listitem> +<listitem><para>Detail</para></listitem> +<listitem><para>Detail Footer</para></listitem> +<listitem><para>Page Footer</para></listitem> +<listitem><para>Report Footer</para></listitem> +</itemizedlist> + +<itemizedlist> +<title>Report sections may contain the following report items:</title> +<listitem><para>Label</para></listitem> +<listitem><para>Field</para></listitem> +<listitem><para>Calculated Field</para></listitem> +<listitem><para>Special Field</para></listitem> +<listitem><para>Line</para></listitem> +</itemizedlist> + +<para>Report sections and items can be placed onto the report template by +using menus or toolbars.</para> + +<para>Every element, such as a report template, a report section or an +item has its own properties. These properties define geometrical, +textual and any other parameters. Every time an element is placed, a set +of default properties is applied. For example, when +<guilabel>Label</guilabel> is placed, its Text property value is +set to <quote>Text</quote>.</para> + +<para>To change properties, use the <guilabel>Report Item +Options</guilabel> dialog. This dialog can be called by &RMB; clicking +on an item or with an <guilabel>Edit Properties</guilabel> button in the +<guilabel>Edit Toolbar</guilabel>. + See screenshot below (properties for a Field item): +</para> + +<para> +To delete an item, &MMB; click on it or use the <guilabel>Delete</guilabel> button in the +<guilabel>Edit Toolbar</guilabel>. +</para> + +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="props.png" format="PNG"/> +</imageobject> +<textobject> +<phrase><guilabel>New Report</guilabel> dialog</phrase> +</textobject> +</mediaobject> +</screenshot> + +<variablelist> +<title>The &kudesigner; menu reference</title> +<varlistentry> +<term><menuchoice> +<shortcut> +<keycombo action="simul">&Ctrl; +<keycap>N</keycap></keycombo> +</shortcut> +<guimenu>File</guimenu> +<guimenuitem>New</guimenuitem> +</menuchoice></term> +<listitem> +<para><action>Bring up</action> the <guilabel>New Report</guilabel> dialog +to create a new report template.</para> +<para> +As seen on the screenshot, the report page size, orientation and margins +must be set before the report can be created. +</para> +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="file_new.png" format="PNG"/> +</imageobject> +<textobject> +<phrase><interface>New Report</interface> dialog</phrase> +</textobject> +</mediaobject> +</screenshot> +</listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<shortcut><keycombo action="simul">&Ctrl; +<keycap>O</keycap> +</keycombo></shortcut> +<guimenu>File</guimenu> +<guimenuitem>Open...</guimenuitem> +</menuchoice></term> +<listitem><para><action>Open</action> the previously saved report template.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>File</guimenu> +<guimenuitem>Open Recent</guimenuitem> +</menuchoice></term> +<listitem><para><action>Display</action> a list of recently opened templates. +Select a file to open it.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<shortcut><keycombo action="simul">&Ctrl; +<keycap>S</keycap> +</keycombo></shortcut> +<guimenu>File</guimenu> +<guimenuitem>Save</guimenuitem> +</menuchoice></term> +<listitem><para><action>Save</action> the current report template into a text file in &XML; format.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>File</guimenu> +<guimenuitem>Save As...</guimenuitem> +</menuchoice></term> +<listitem><para><action>Save</action> the current report template into a file and give it another name.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<shortcut><keycombo action="simul">&Ctrl; +<keycap>W</keycap> +</keycombo></shortcut> +<guimenu>File</guimenu> +<guimenuitem>Close</guimenuitem> +</menuchoice></term> +<listitem><para><action>Close</action> the current report template.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<shortcut><keycombo action="simul">&Ctrl; +<keycap>P</keycap> +</keycombo></shortcut> +<guimenu>File</guimenu> +<guimenuitem>Print</guimenuitem> +</menuchoice></term> +<listitem><para><action>Print...</action> the current report template as text in &XML; format.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<shortcut><keycombo action="simul">&Ctrl; +<keycap>Q</keycap> +</keycombo></shortcut> +<guimenu>File</guimenu> +<guimenuitem>Quit</guimenuitem> +</menuchoice></term> +<listitem><para><action>Quit</action> the program.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Edit</guimenu> +<guimenuitem>Clear Selection</guimenuitem> +</menuchoice></term> +<listitem><para><action>Cancel</action> any edit action, so no properties +will be edited or items deleted.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Edit</guimenu> +<guimenuitem>Edit Properties</guimenuitem> +</menuchoice></term> +<listitem><para><action>Edit</action> properties of the selected item.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Edit</guimenu> +<guimenuitem>Delete</guimenuitem> +</menuchoice></term> +<listitem><para><action>Delete</action> the selected item.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Sections</guimenu> +<guimenuitem>Report Header</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Report Header</action> section onto the report template.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Sections</guimenu> +<guimenuitem>Page Header</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Page Header</action> section onto the report template.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Sections</guimenu> +<guimenuitem>Detail Header</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Detail Header</action> section onto the report template.</para> +<para>Before placing the section, the <guilabel>Add Detail Header</guilabel> dialog will be shown to +specify the detail level. The Detail header will be added to the detail section of the given level.</para> +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="add_detail_header.png" format="PNG"/> +</imageobject> +<textobject> +<phrase><guilabel>Add Detail Header</guilabel> dialog</phrase> +</textobject> +</mediaobject> +</screenshot> +</listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Sections</guimenu> +<guimenuitem>Detail</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Detail</action> section onto the report template.</para> +<para>Before placing the section, the <guilabel>Add Detail</guilabel> dialog will be shown to +specify the detail level.</para> +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="add_detail.png" format="PNG"/> +</imageobject> +<textobject> +<phrase><interface>Add Detail</interface> dialog</phrase> +</textobject> +</mediaobject> +</screenshot> +</listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Sections</guimenu> +<guimenuitem>Detail Footer</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Detail Footer</action> section onto the report template.</para> +<para>Before placing the section, the <guilabel>Add Detail Footer</guilabel> dialog will be shown to +specify the detail level. The Detail footer will be added to the detail section of the given level.</para> +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="add_detail_footer.png" format="PNG"/> +</imageobject> +<textobject> +<phrase><guilabel>Add Detail Footer</guilabel> dialog</phrase> +</textobject> +</mediaobject> +</screenshot> +</listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Sections</guimenu> +<guimenuitem>Page Footer</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Page Footer</action> section onto the report template.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Sections</guimenu> +<guimenuitem>Report Footer</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Report Footer</action> section onto the report template.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Items</guimenu> +<guimenuitem>Clear Selection</guimenuitem> +</menuchoice></term> +<listitem><para><action>Clear</action> item selection, so no report item will be added to the section.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Items</guimenu> +<guimenuitem>Label</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Label</action> element onto the section.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Items</guimenu> +<guimenuitem>Field</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Field</action> element onto the section.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Items</guimenu> +<guimenuitem>Calculated Field</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Calculated Field</action> element onto the section.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Items</guimenu> +<guimenuitem>Special Field</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Special Field</action> element onto the section.</para></listitem> +</varlistentry> + +<varlistentry> +<term><menuchoice> +<guimenu>Items</guimenu> +<guimenuitem>Line</guimenuitem> +</menuchoice></term> +<listitem><para><action>Place the Line</action> element onto the section.</para></listitem> +</varlistentry> + +</variablelist> +</chapter> diff --git a/doc/kugar/file_new.png b/doc/kugar/file_new.png Binary files differnew file mode 100644 index 00000000..310c0e46 --- /dev/null +++ b/doc/kugar/file_new.png diff --git a/doc/kugar/index.docbook b/doc/kugar/index.docbook new file mode 100644 index 00000000..cbe87b76 --- /dev/null +++ b/doc/kugar/index.docbook @@ -0,0 +1,156 @@ +<?xml version="1.0" ?> +<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ + <!ENTITY kudesigner "Kugar Report Designer"> + <!ENTITY kugar "Kugar"> + <!ENTITY kappname "&kugar;"> + <!ENTITY package "koffice"> + <!ENTITY % addindex "IGNORE"> + <!ENTITY % English "INCLUDE"> + <!ENTITY template SYSTEM "template.docbook"> + <!ENTITY templatedtd SYSTEM "templatedtd.docbook"> + <!ENTITY templateelements SYSTEM "template-elements.docbook"> + <!ENTITY datadtd SYSTEM "datadtd.docbook"> + <!ENTITY dataelements SYSTEM "dataref.docbook"> + <!ENTITY progguide SYSTEM "progguide.docbook"> + <!ENTITY starting SYSTEM "starting.docbook"> + <!ENTITY designermanual SYSTEM "designer.docbook"> + <!ENTITY tutorial SYSTEM "tutorial.docbook"> +]> + +<book lang="&language;"> + +<bookinfo> +<title>The &kugar; Handbook</title> + +<authorgroup> +<author> +<firstname>Alexander</firstname> +<surname>Dymo</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<author> +<firstname>Phil</firstname> +<surname>Thompson</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> +<copyright> +<year>2000</year> +<year>2001</year> +<holder>Phil Thompson</holder> +</copyright> +<copyright> +<year>2002</year> +<holder>Alexander Dymo</holder> +</copyright> +<!--&underFDL;--> +<legalnotice>&FDLNotice;</legalnotice> + +<date>2002-06-11</date> +<releaseinfo>1.02.00</releaseinfo> + +<!-- Abstract about this handbook --> + +<abstract> +<para> +&kugar; is a template based &XML; report engine. +&kudesigner; is a flexible &GUI; report template designer for &kugar; report engine. +</para> +</abstract> + +<keywordset> +<keyword>KDE</keyword> +<keyword>kdeutils</keyword> +<keyword>kugar</keyword> +<keyword>kudesigner</keyword> +<keyword>report</keyword> +<keyword>generator</keyword> +<keyword>engine</keyword> +<keyword>designer</keyword> +</keywordset> + +</bookinfo> + +<chapter id="introduction"> +<title>Introduction</title> + +<para> &kugar; is a report creation tool for &Qt; and &kde;. It includes +a &GUI; report template designer, a report engine, a &konqueror; part +for easy report preview and a set of examples.</para> + +<para> The &kudesigner; is a report template creation tool +for the &kugar; report engine. The &kugar; report engine uses an &XML; +based report template file (which can be created by hand or with +&kudesigner;) and a data file (also in &XML; format) to create +reports. To get more information on &kudesigner; refer to the <link +linkend="designer-manual">Report Template Designer Manual</link>. +</para> + +<para> See <link linkend="template-dtd"> The KugarTemplate Document +Type Definition</link> for an overview of the template's +<acronym>DTD</acronym> (file format), <link +linkend="kugardata-dtd">KugarData Document Type Definition</link> and +<link linkend="tutorial">Tutorial</link> for a step-by-step explanation +on how reports can be created. </para> + +<para> Programmers should also refer to the <link +linkend="prog-guide">Programmer's guide</link> to find information +about using &kugar; in their own applications.</para> +</chapter> + +&tutorial; + +&starting; + +&designermanual; + +&progguide; + +<chapter> +<title>Credits and License</title> + +<para> +&kugar; +</para> + +<para> +Copyright 2000 Mutiny Bay Software +</para> +<para> +Copyright 2000, 2001, Phil Thompson +</para> +<para> +Copyright 2002 Alexander Dymo +</para> + +<para>Portions of the documentation Copyright 2000, 2001 Phil Thompson +and Copyright 2002 Alexander Dymo</para> + +<!-- TRANS:CREDIT_FOR_TRANSLATORS --> +&underFDL; +&underGPL; + +</chapter> + +<appendix id="document-structure"> +<title>Document Structure</title> +&templatedtd; +&template; +&templateelements; +&datadtd; +&dataelements; +</appendix> + +<appendix id="installation"> +<title>Installation</title> + +&install.intro.documentation; +&install.compile.documentation; +</appendix> + +</book> diff --git a/doc/kugar/kugar.png b/doc/kugar/kugar.png Binary files differnew file mode 100644 index 00000000..7232fa5c --- /dev/null +++ b/doc/kugar/kugar.png diff --git a/doc/kugar/progguide.docbook b/doc/kugar/progguide.docbook new file mode 100644 index 00000000..5b60db0d --- /dev/null +++ b/doc/kugar/progguide.docbook @@ -0,0 +1,544 @@ +<!-- If you want to validate or edit this document separately, uncomment +this prolog + +<?xml version="1.0" ?> +<!DOCTYPE chapter PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd"> + +--> + +<chapter id="prog-guide"> +<chapterinfo> +<authorgroup> +<author> +<firstname>Alexander</firstname> +<surname>Dymo</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<author> +<firstname>Phil</firstname> +<surname>Thompson</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> +</chapterinfo> +<title>Programmer's Guide</title> + +<sect1 id="how-to-use-in-progs"> +<title>How to use &kugar; for reporting in your own programs</title> + +<itemizedlist> +<title>There are several ways to use &kugar;</title> +<listitem> +<para> +Create a temporary file and fill it with data, organized according to the +<link linkend="kugardata-dtd">KugarData Document Type Definition</link>. Then +call the <command>kugar</command> shell command ( +<cmdsynopsis> +<command>kugar</command> +<group> +<option>-d <replaceable>Kugar data file</replaceable></option> +</group> +<group> +<option>-r <replaceable>Kugar template file</replaceable></option> +</group> +</cmdsynopsis> +) to preview and print the report. +See <link linkend="prog-using-for-preview">Using &kugar; shell for previewing reports</link> +for a detailed description. +</para> +</listitem> +<listitem> +<para> +Use &kugar; directly in the application's code. +See <link linkend="prog-using-widget">Using &kugar; classes for reporting</link> +for a detailed description. +</para> +</listitem> +<listitem> +<para> +Create a &Qt; designer plugin, use it to build the application &GUI; in the designer and +link it to the program dynamically. +See <link linkend="prog-designer-plugin">Creating a &Qt; designer plugin</link> +for a detailed description. +</para> +</listitem> +</itemizedlist> + +<para> The last two ways are acceptable for &Qt; and &kde; developers; +but &kugar; is designed to be a report generator, independent from a +programming language and/or <acronym>IDE</acronym>. It uses &XML; +format for describing report templates and data files. So any program +can produce output in &kugar; data file format as described in <link +linkend="kugardata-dtd">KugarData <acronym>DTD</acronym></link> or +even a report template file format (see <link +linkend="template-dtd">KugarTemplate <acronym>DTD</acronym></link>). +&kugar; shell (report viewer) can be used to preview and print the +generated report. </para> + +</sect1> + +<sect1 id="prog-using-for-preview"> +<title>Using &kugar; shell for previewing reports</title> + +<orderedlist> +<title>The way to create and preview (print) a report is:</title> +<listitem> +<para> +Create a report template file with &kudesigner; +</para> +</listitem> +<listitem> +<para> +Create a data file with column values for detail bands of the report. +Use <link linkend="kugardata-dtd">KugarData <acronym>DTD</acronym></link> to produce correct data files. +</para> +</listitem> +<listitem> +<para> +Run &kugar; shell to preview and print a report. For example, to do this, in C or C++ +languages call:</para> + +<programlisting> +<function>system(<option>"kugar -r <replaceable>template_file.ktf</replaceable>-d <replaceable>data_file.kdf</replaceable>"</option>)</function>. +</programlisting> + +<para> +Don't forget to include <filename class="headerfile">stdlib.h</filename>. +</para> +</listitem> +</orderedlist> +</sect1> + +<sect1 id="prog-using-widget"> +<title>Using &kugar; classes for reporting</title> +<para> +The &kugar; library includes two widgets for use. +</para> +<para> +The <classname>KReportViewer</classname> class is designed for &kde; +developers. It supports a &kde; printing system and &UNIX; localization +via <function>i18n()</function> calls. +</para> +<para> +The <classname>MReportViewer</classname> class is designed for &Qt; +developers and provides real crossplatforming. It can be used not +only on &UNIX; platforms, but also on &Windows; and &MacOS;. +</para> +<para> +In order to build a program that uses the &kugar; library, it should be linked +with <filename>libkugar.so</filename> shared library, which is provided with the &kugar; distribution on all +&UNIX; platforms. +</para> +<para> +Include files are <filename>kugarqt.h</filename> and <filename>kugar.h</filename> +for &Qt; and &kde; programs respectively. +</para> +<para>For a detailed example of how &kugar; classes can be used, look in the <filename class="directory">/shell</filename> +folder in the &kugar; sources. +</para> +<para> +<classname>MReportViewer</classname> (and <classname>KReportViewer</classname> too) +contains several public methods that can be used. +</para> +<funcsynopsis> +<funcprototype> +<funcdef>void <function>renderReport</function></funcdef> +<void/> +</funcprototype> +<funcsynopsisinfo>Renders the report onto a screen.</funcsynopsisinfo> +</funcsynopsis> + +<funcsynopsis> +<funcprototype> +<funcdef>void <function>printReport</function></funcdef> +<void/> +</funcprototype> +<funcsynopsisinfo>Calls the print dialog to print the report.</funcsynopsisinfo> +</funcsynopsis> + +<funcsynopsis> +<funcprototype> +<funcdef>void <function>clearReport</function></funcdef> +<void/> +</funcprototype> +<funcsynopsisinfo>Clears the report on a screen and frees report data. +Call this before opening the new report.</funcsynopsisinfo> +</funcsynopsis> + +<funcsynopsis> +<funcprototype> +<funcdef>bool <function>setReportData</function></funcdef> +<paramdef>const QString &<parameter>data_file_name</parameter></paramdef> +</funcprototype> +<funcsynopsisinfo>Sets report data from <replaceable>data_file_name</replaceable> file.</funcsynopsisinfo> +</funcsynopsis> + +<funcsynopsis> +<funcprototype> +<funcdef>bool <function>setReportData</function></funcdef> +<paramdef>const QIODevice &<parameter>data_io_device</parameter></paramdef> +</funcprototype> +<funcsynopsisinfo>Sets report data from <replaceable>data_io_device</replaceable> file. +IO device can be any successor of the <classname>QIODevice</classname> class. +For example, to fetch records directly from the database, +create a <classname>QIODevice</classname> successor and redefine all necessary +functionality. +</funcsynopsisinfo> +</funcsynopsis> + +<funcsynopsis> +<funcprototype> +<funcdef>bool <function>setReportTemplate</function></funcdef> +<paramdef>const QString &<parameter>template_file_name</parameter></paramdef> +</funcprototype> +<funcsynopsisinfo>Sets report template from <replaceable>template_file_name</replaceable> file.</funcsynopsisinfo> +</funcsynopsis> + +<funcsynopsis> +<funcprototype> +<funcdef>bool <function>setReportTemplate</function></funcdef> +<paramdef>const QIODevice &<parameter>template_io_device</parameter></paramdef> +</funcprototype> +<funcsynopsisinfo>Sets report template from <replaceable>template_io_device</replaceable> file. +IO device can be any successor of the <classname>QIODevice</classname> class. +For example, to obtain a report template from network storage or database, +create a QIODevice successor and redefine all necessary functionality. +</funcsynopsisinfo> +</funcsynopsis> + +</sect1> + +<sect1 id="prog-designer-plugin"> +<title>Creating &Qt; designer plugin</title> + +<para> +This is the example code of how a designer plugin is created. The code below creates a plugin for +a &kde; <classname>KReportViewer</classname> widget. +</para> + +<para> +If a &Qt; +widget is desired, replace <classname>KReportViewer</classname> with +<classname>MReportViewer</classname> and <filename>kugar.h</filename> with +<filename>kugarqt.h</filename> in the plugin code. +</para> + +<sect2 id="plugin-usage"> +<title>Plugin usage</title> +<para> +The designer plugin will allow the usage of &Qt; Designer to place a <classname>KReportViewer</classname> +widget onto a window and preview it correctly. +</para> + +<para> +Programs that make use of this plugin must be linked dynamically with it. +The corresponding library is called <filename>libkugar_plugin.so</filename>. +Widgets or dialogs that include <classname>KReportViewer</classname> +widget must include <kugar.h> in implementation and have a forward declaration +of <classname>class KReportViewer</classname>. Includes can be done with &Qt; +Designer's Object Explorer (Source tab). +</para> + +<para> +To build the plugin run: +<cmdsynopsis> +<command>qmake</command> +<arg>kugar_plugin.pro</arg> +</cmdsynopsis> +<cmdsynopsis> +<command>make</command> +</cmdsynopsis> +</para> + +</sect2> + +<sect2 id="plugin-code"> +<title>Plugin code</title> + +<segmentedlist> +<title>The plugin code consists of three files:</title> +<segtitle><link linkend="plugin-h-source">kugar_plugin.h</link></segtitle> +<segtitle><link linkend="plugin-cpp-source">kugar_plugin.cpp</link></segtitle> +<segtitle><link linkend="plugin-pro-source">kugar_plugin.pro</link></segtitle> +<seglistitem> +<seg>A header file for the <classname>KugarWidgetPlugin</classname>, <classname>QWidgetPlugin</classname> successor;</seg> +<seg>A source file for the <classname>KugarWidgetPlugin</classname>, <classname>QWidgetPlugin</classname> successor;</seg> +<seg>A project file for the <application>QMake</application> utility.</seg> +</seglistitem> +</segmentedlist> + +<sect3 id="plugin-h-source"> +<title>kugar_plugin.h</title> + +<programlisting> +#include <qwidgetplugin.h> + +class KugarWidgetPlugin:public QWidgetPlugin +{ +public: + KugarWidgetPlugin (); + + QStringList keys () const; + QWidget *create (const QString & classname, QWidget * parent = + 0, const char *name = 0); + QString group (const QString &) const; + QIconSet iconSet (const QString &) const; + QString includeFile (const QString &) const; + QString toolTip (const QString &) const; + QString whatsThis (const QString &) const; + bool isContainer (const QString &) const; +}; +</programlisting> +</sect3> + + +<sect3 id="plugin-cpp-source"> +<title>kugar_plugin.cpp</title> + +<programlisting> +#include "kugar_plugin.h" +#include <kugar.h> + +static const char *kugar_pixmap[] = { + "22 22 127 2", + ".d c #000000", + ".c c #131313", + ".b c #282828", + ".a c #434241", + ".e c #4e463a", + ".# c #595551", + ".G c #66553b", + "#F c #68635f", + "#R c #6b4f23", + "#q c #6e6862", + "#M c #6f5229", + ".n c #6f6146", + ".w c #735310", + ".V c #755c2a", + ".I c #775f34", + ".0 c #77694a", + "#n c #7e6434", + ".o c #806f50", + "#C c #835d2d", + ".P c #837c75", + "#B c #85653a", + "#k c #85827e", + ".x c #866d46", + ".U c #877967", + ".X c #888888", + ".F c #89724d", + "#x c #8b6d2a", + ".S c #8d7759", + ".z c #8e733b", + "#L c #906e49", + "#Q c #947b56", + ".r c #948058", + ".J c #957844", + ".4 c #987736", + ".q c #998969", + ".k c #999897", + ".R c #9a8a75", + "#i c #9f8348", + "#I c #a37c4b", + ".u c #a38d66", + ".E c #a58558", + "#A c #a8834b", + ".s c #a9967a", + ".t c #aa9467", + ".C c #ae9f8d", + "#6 c #afa49d", + "#5 c #afa9a4", + "#W c #b18e4d", + ".K c #b1935a", + ".B c #b39660", + "#V c #b49866", + "#a c #b49d6c", + "## c #b49d72", + ".j c #b5b4b4", + "#0 c #b7a597", + ".O c #b9b1a9", + ".L c #bb9c61", + ".M c #bb9e6b", + ".A c #bca778", + "#j c #bea46b", + ".T c #bfb37d", + ".v c #c0b391", + ".W c #c3a262", + ".i c #c4c4c4", + "#m c #c5b7aa", + "#8 c #c69f80", + ".D c #c6b79b", + "#3 c #c7a589", + ".7 c #c7a76c", + "#u c #c7bbaf", + ".6 c #c8ad74", + "#7 c #c8b7a9", + "#r c #c8beb5", + ".m c #c8c8c8", + "#U c #cbad96", + "#f c #ccb681", + "#h c #cdac6c", + "#P c #cdb49f", + "#X c #cdb8a6", + "#H c #ceb7a4", + ".y c #ceb892", + ".N c #cecac3", + "#Z c #cfb16f", + "#O c #cfbdad", + ".Z c #cfc7c0", + "#w c #d0bcab", + ".5 c #d1ad6b", + "#s c #d1bfb1", + ".h c #d5d5d5", + "#l c #d6cdc6", + "#D c #d8b36e", + ".H c #dac592", + "#t c #dbb977", + ".g c #dcdcdc", + ".1 c #e0dcc1", + ".f c #e0e0df", + "#1 c #e3c8b1", + "#S c #e4cdb9", + ".3 c #e4d9a3", + "#4 c #e6c1a1", + "#2 c #e7c4a5", + "#K c #e9c179", + "#g c #e9c47e", + "#Y c #e9c8ac", + ".2 c #eae6c0", + "#T c #ebcdb3", + ".Q c #ebd4b9", + "#E c #ecca87", + "#z c #ecd799", + ".l c #ececeb", + "#G c #efd7c2", + "#e c #efe3ab", + ".8 c #efe8e3", + "#v c #f1dcca", + "#. c #f2e2d4", + ".p c #f4f4f4", + "#y c #f5daa0", + "#J c #f6cf7f", + ".9 c #f7ede4", + "#p c #f9d995", + ".Y c #fcf9f6", + "#d c #fefcc5", + "#c c #fefdda", + "#b c #fefee1", + "#N c #ffd685", + "#o c #fff0a9", + "Qt c #ffffff", + "QtQtQtQtQtQt.#.a.a.a.b.b.b.c.c.d.d.dQtQtQtQt", + "QtQtQtQtQtQt.e.f.g.g.f.g.g.h.i.j.d.k.dQtQtQt", + "QtQtQtQtQtQt.a.gQtQtQtQtQtQt.l.f.c.m.k.dQtQt", + "QtQtQtQtQt.n.n.n.n.n.o.g.pQtQt.l.bQt.m.k.dQt", + "QtQtQt.q.q.r.q.s.t.r.q.u.u.g.pQt.a.fQt.m.k.d", + "QtQt.s.s.v.w.x.y.y.t.z.A.t.B.i.p.#.a.b.c.d.d", + "Qt.C.C.D.E.F.G.A.H.F.I.J.K.L.M.i.p.l.N.O.P.d", + "Qt.s.v.Q.q.R.S.T.A.R.U.V.L.W.W.X.g.Y.f.Z.k.d", + ".0.s.t.Q.1.U.R.2.3.S.U.4.5.6.6.7.j.8.9#..O.d", + ".G##.V#a#b.1#c#c#d#e#f#g#h#i#j.W#k#l.9#.#m.d", + ".G.4.F#n#c#c#c#d#d#o#p#g.x.w#i.L#q#r#.#.#s.d", + ".e.J.J.I.3#d.H#j.6#f#p#t#n.w.E.L#q#u#.#v#w.d", + ".G.A#x.z#y#z#A#B#B#C#D#E.4.4.6#h#F#m#v#G#H.d", + ".o.s.A#j#E#t#I#I#I#C#A#J#p#p#K#t#F#m#v#G#H.d", + "Qt##.A.6.7#I#I#A.E#L#M.W#N#J#K.a.U#O#G.Q#P.d", + "Qt#a.M.L.J#A#I.4.E#Q.x#R#D#J#g.#.C#S.Q#T#U.d", + "QtQt#V.K.z#Q.s.S.x.S#B#M#W#E.a.U#X.Q#T#Y#U.d", + "QtQtQt.M#i#B.r#Q#Q.r#Q.z#Z.a#q#0#1#T#Y#2#3.d", + "QtQtQtQtQt#j.L.L.W.5#t.a.#.U#0#1#T#Y#2#4#3.d", + "QtQtQtQtQtQt.d#F#q#q#q.P.C#O#S.Q#T#Y#2#4#3.d", + "QtQtQtQtQtQt.d#5#5#6#6#0#7#w#H#P#U#U#3#3#8.d", + "QtQtQtQtQtQt.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d.d" +}; + +KugarWidgetPlugin::KugarWidgetPlugin () +{ +} + +QStringList KugarWidgetPlugin::keys () const +{ + QStringList list; + list << "KReportViewer"; + return list; +} + +QWidget* KugarWidgetPlugin::create (const QString & key, QWidget * parent, + const char *name) +{ + if (key == "KReportViewer") + return new KReportViewer (parent, name); + return 0; +} + +QString KugarWidgetPlugin::group (const QString & feature) const +{ + if (feature == "KReportViewer") + return "Display"; + return QString::null; +} + +QIconSet KugarWidgetPlugin::iconSet (const QString &) const +{ + return QIconSet (QPixmap (kugar_pixmap)); +} + +QString KugarWidgetPlugin::includeFile (const QString & feature) const +{ + if (feature == "KReportViewer") + return "kugar.h"; + return QString::null; +} + +QString KugarWidgetPlugin::toolTip (const QString & feature) const +{ + if (feature == "KReportViewer") + return "Kugar report viewer widget"; + return QString::null; +} + +QString KugarWidgetPlugin::whatsThis (const QString & feature) const +{ + if (feature == "KReportViewer") + return "A widget to view xml reports"; + return QString::null; +} + +bool KugarWidgetPlugin::isContainer (const QString &) const +{ + return FALSE; +} + +Q_EXPORT_PLUGIN( KugarWidgetPlugin ) +</programlisting> +</sect3> + +<sect3 id="plugin-pro-source"> +<title>kugar_plugin.pro</title> + +<programlisting> +SOURCES += kugar_plugin.cpp +HEADERS += kugar_plugin.h + +DESTDIR = $(QTDIR)/plugins/designer +TARGET = kugar_plugin + +target.path=$$plugins.path +isEmpty(target.path):target.path=$$QT_PREFIX/plugins +PROJECTNAME = KugarPlugin +TEMPLATE = lib +CONFIG += qt warn_on release plugin +unix:LIBS += -lkugar +LANGUAGE = C++ +</programlisting> +</sect3> + +</sect2> + +</sect1> +</chapter> diff --git a/doc/kugar/props.png b/doc/kugar/props.png Binary files differnew file mode 100644 index 00000000..7a110f89 --- /dev/null +++ b/doc/kugar/props.png diff --git a/doc/kugar/starting.docbook b/doc/kugar/starting.docbook new file mode 100644 index 00000000..555df6a9 --- /dev/null +++ b/doc/kugar/starting.docbook @@ -0,0 +1,60 @@ +<!-- If you want to validate or edit this document separately, uncomment +this prolog + +<?xml version="1.0" ?> +<!DOCTYPE appendix PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd"> + +--> +<chapter id="starting"> +<chapterinfo> +<authorgroup> +<author> +<firstname>Alexander</firstname> +<surname>Dymo</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<author> +<firstname>Phil</firstname> +<surname>Thompson</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> +</chapterinfo> +<title>Starting &kugar; and &kudesigner;</title> +<para> +The &kugar; program takes two commandline arguments: +</para> + +<cmdsynopsis> +<command>kugar</command> +<group> +<option>-d <replaceable>Kugar data file</replaceable></option> +</group> +<group> +<option>-r <replaceable>Kugar template file</replaceable></option> +</group> +</cmdsynopsis> + +<para> +For example, <userinput><command>kugar</command> <option>-d</option> +<parameter>sample1.kdf</parameter> <option>-r</option> +<parameter>sample1.ktf</parameter></userinput> +</para> + +<para> +The &kudesigner; program can be started with no arguments +or with a report template file name as an argument: +</para> +<cmdsynopsis> +<command>kudesigner</command> +<group> +<replaceable>template.ktf</replaceable> +</group> +</cmdsynopsis> + +</chapter> diff --git a/doc/kugar/template-elements.docbook b/doc/kugar/template-elements.docbook new file mode 100644 index 00000000..d48bb2a7 --- /dev/null +++ b/doc/kugar/template-elements.docbook @@ -0,0 +1,2493 @@ +<!-- If you want to edit or validate this document separately, uncomment --> +<!-- this prolog +<?xml version="1.0" ?> +<!DOCTYPE chapter PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd"> +--> +<sect1 id="template-elements"> +<sect1info> +<authorgroup> +<author> +<firstname>Alexander</firstname> +<surname>Dymo</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<author> +<firstname>Phil</firstname> +<surname>Thompson</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> +</sect1info> +<title><sgmltag class="element">KugarTemplate</sgmltag> template +elements</title> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Section bands</entry> +<entry>Section elements</entry> +</row> +</thead> +<tbody> +<row> +<entry><link linkend="report-header-and-footer"><sgmltag class="element">ReportHeader</sgmltag></link></entry> +<entry><link linkend="line-element"><sgmltag class="element">Line</sgmltag></link></entry> +</row> +<row> +<entry><link linkend="page-header-and-footer"><sgmltag class="element">PageHeader</sgmltag></link></entry> +<entry><link linkend="label-element"><sgmltag class="element">Label</sgmltag></link></entry> +</row> +<row> +<entry><link linkend="detail-header-and-footer"><sgmltag class="element">DetailHeader</sgmltag></link></entry> +<entry><link linkend="field-element"><sgmltag class="element">Field</sgmltag></link></entry> +</row> +<row> +<entry><link linkend="detail"><sgmltag class="element">Detail</sgmltag></link></entry> +<entry><link linkend="calculated-field-element"><sgmltag class="element">CalculatedField</sgmltag></link></entry> +</row> +<row> +<entry><link linkend="detail-header-and-footer"><sgmltag class="element">DetailFooter</sgmltag></link></entry> +<entry><link linkend="special-element"><sgmltag class="element">Special</sgmltag></link></entry> +</row> +<row> +<entry><link linkend="page-header-and-footer"><sgmltag class="element">PageFooter</sgmltag></link></entry> +<entry>Page Footer</entry> +</row> +<row> +<entry><link linkend="report-header-and-footer"><sgmltag class="element">ReportFooter</sgmltag></link></entry> +<entry>Report Footer</entry> +</row> +</tbody> +</tgroup> +</informaltable> + + +<sect2 id="report-header-and-footer"> +<title><sgmltag class="element">ReportHeader</sgmltag> and <sgmltag +class="element">ReportFooter</sgmltag> sections</title> + +<para> +The <sgmltag class="element">ReportHeader</sgmltag> and <sgmltag +class="element">ReportFooter</sgmltag> elements define report sections +that are usually printed at the beginning and end of the report. +</para> + +<synopsis> +<!ELEMENT ReportHeader (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*)> +<!ATTLIST ReportHeader + Height CDATA #REQUIRED + PrintFrequency CDATA #REQUIRED> +</synopsis> + +<synopsis> +<!ELEMENT ReportFooter (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*, <link linkend="calculated-field-element">CalculatedField</link>*)> +<!ATTLIST ReportFooter + Height CDATA #REQUIRED + PrintFrequency CDATA #REQUIRED> +</synopsis> + +<variablelist> + +<varlistentry> +<term>Attributes</term> +<listitem> + +<variablelist> +<varlistentry> +<term><anchor id="rhf-height"/><sgmltag class="attribute">Height</sgmltag></term> +<listitem> +<para>Sets the height of the report section. If you don't want +this section, set this value to <sgmltag class="attvalue">0</sgmltag>. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="rhf-printfrequency"/><sgmltag class="attribute">PrintFrequency</sgmltag></term> +<listitem> +<para> +Set the print frequency of the section. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Print Frequency</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>First Page</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Every Page</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Last Page</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> +</variablelist> +</listitem> +</varlistentry> +</variablelist> +</sect2> + +<sect2 id="page-header-and-footer"> +<title><sgmltag class="element">PageHeader</sgmltag> and <sgmltag +class="element">PageFooter</sgmltag> sections</title> + +<para> +The <sgmltag class="element">PageHeader</sgmltag> and <sgmltag +class="element">PageFooter</sgmltag> elements define report sections +that are usually printed on every page of the report. +</para> + +<synopsis> +<!ELEMENT PageHeader (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*)> +<!ATTLIST PageHeader + Height CDATA #REQUIRED + PrintFrequency CDATA #REQUIRED> +</synopsis> + +<synopsis> +<!ELEMENT PageFooter (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*)> +<!ATTLIST PageFooter + Height CDATA #REQUIRED + PrintFrequency CDATA #REQUIRED> +</synopsis> + +<variablelist> + +<varlistentry> +<term>Attributes</term> +<listitem> + +<variablelist> +<varlistentry> +<term><anchor id="phf-height"/><sgmltag class="attribute">Height</sgmltag></term> +<listitem> +<para>Sets the height of the report section. If you don't want +this section, set this value to <sgmltag class="attvalue">0</sgmltag>. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="phf-printfrequency"/><sgmltag class="attribute">PrintFrequency</sgmltag></term> +<listitem> +<para> +Set the print frequency of the section. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Print Frequency</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>First Page</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Every Page</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Last Page</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> +</variablelist> +</listitem> +</varlistentry> +</variablelist> + +</sect2> + +<sect2 id="detail-header-and-footer"> +<title><sgmltag class="element">DetailHeader</sgmltag> and <sgmltag +class="element">DetailFooter</sgmltag> sections</title> + +<para> +The <sgmltag class="element">DetailHeader</sgmltag> and <sgmltag +class="element">DetailFooter</sgmltag> elements define report sections +that are printed before and after details of a given level and below on the report. +</para> + +<synopsis> +<!ELEMENT DetailHeader (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*)> +<!ATTLIST DetailHeader + Height CDATA #REQUIRED + Level CDATA #REQUIRED> +</synopsis> + +<synopsis> +<!ELEMENT DetailFooter (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*)> +<!ATTLIST DetailFooter + Height CDATA #REQUIRED + Level CDATA #REQUIRED> +</synopsis> + +<variablelist> + +<varlistentry> +<term>Attributes</term> +<listitem> + +<variablelist> +<varlistentry> +<term><anchor id="dhf-height"/><sgmltag class="attribute">Height</sgmltag></term> +<listitem> +<para>Sets the height of the report section. If you don't want +this section, set this value to <sgmltag class="attvalue">0</sgmltag>. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="dhf-level"/><sgmltag class="attribute">Level</sgmltag></term> +<listitem> +<para> +Set the hierarchy level of the section. Sections with higher levels will be printed +before sections with lower ones. Level can be any number beginning from 0. +</para> + +</listitem> +</varlistentry> +</variablelist> +</listitem> +</varlistentry> +</variablelist> + +</sect2> + +<sect2 id="detail"> +<title><sgmltag class="element">Detail</sgmltag> section</title> + +<para> +The <sgmltag class="element">Detail</sgmltag> element defines the report +section that contains the report data. The report can have multiple details, +which are accessed by the detail's Level attribute. +</para> + +<synopsis> +<!ELEMENT Detail (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*, <link linkend="field-element">Field</link>*)> +<!ATTLIST Detail + Height CDATA #REQUIRED + Level CDATA #REQUIRED> +</synopsis> + +<variablelist> +<varlistentry> +<term>Attributes</term> +<listitem> + +<variablelist> +<varlistentry> +<term><anchor id="d-height"/><sgmltag class="attribute">Height</sgmltag></term> +<listitem> +<para>Sets the height of the report section. If you don't want +this section, set this value to <sgmltag class="attvalue">0</sgmltag>. +</para> +</listitem> +</varlistentry> +<varlistentry> +<term><anchor id="d-level"/><sgmltag class="attribute">Level</sgmltag></term> +<listitem> +<para> +Set the hierarchy level of the section. Sections with higher levels will be printed +before sections with lower ones. Level can be any number beginning from 0. This is an attribute +of a <sgmltag class="attribute">row</sgmltag> element in a data file. +</para> + +</listitem> +</varlistentry> + +</variablelist> +</listitem> +</varlistentry> +</variablelist> +</sect2> + +<sect2 id="line-element"> +<title><sgmltag class="element">Line</sgmltag></title> + +<para> +The <sgmltag class="element">Line</sgmltag> element defines a report +object used to draw lines on a report. +</para> + +<synopsis> +<!ELEMENT Line EMPTY> +<!ATTLIST Line + X1 CDATA #REQUIRED + Y1 CDATA #REQUIRED + X2 CDATA #REQUIRED + Y2 CDATA #REQUIRED + Width CDATA #REQUIRED + Color CDATA #REQUIRED + Style CDATA #REQUIRED> +</synopsis> + +<variablelist> +<varlistentry> +<term>Attributes</term> +<listitem> +<variablelist> + +<varlistentry> +<term><anchor id="l-x1"/><sgmltag class="attribute">X1</sgmltag></term> +<listitem> +<para> +Sets the starting x coordinate (relative to the section's upper left corner) for the line. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="l-y1"/><sgmltag class="attribute">Y1</sgmltag></term> +<listitem> +<para> +Sets the starting y coordinate (relative to the section's upper left corner) for the line. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="l-x2"/><sgmltag class="attribute">X2</sgmltag></term> +<listitem> +<para> +Sets the ending x coordinate (relative to the section's upper left corner) for the line. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="l-y2"/><sgmltag class="attribute">Y2</sgmltag></term> +<listitem> +<para> +Sets the ending y coordinate (relative to the section's upper left corner) for the line. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="l-width"/><sgmltag class="attribute">Width</sgmltag></term> +<listitem> +<para> +Sets the width of the line. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="l-color"/><sgmltag class="attribute">Color</sgmltag></term> +<listitem> +<para> +Sets the color of the line. The color is defined as an RGB (Red Green Blue) value +(r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="l-style"/><sgmltag class="attribute">Style</sgmltag></term> +<listitem> +<para> +Sets the drawing style for the line. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Line Style</entry> +</row> +</thead> + +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>No Pen</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Solid</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Dash</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>Dot</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>Dash Dot</entry> +</row> +<row> +<entry><sgmltag class="attvalue">5</sgmltag></entry> +<entry>Dash Dot Dot</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> +</variablelist> +</listitem> +</varlistentry> +</variablelist> +</sect2> + +<sect2 id="label-element"> +<title><sgmltag class="element">Label</sgmltag></title> + +<para> +The <sgmltag class="element">Label</sgmltag> element defines a report +object used to draw fixed text on a report. +</para> + +<synopsis> + <!ELEMENT Label EMPTY> + <!ATTLIST Label + Text CDATA #REQUIRED + X CDATA #REQUIRED + Y CDATA #REQUIRED + Width CDATA #REQUIRED + Height CDATA #REQUIRED + BackgroundColor CDATA #REQUIRED + ForegroundColor CDATA #REQUIRED + BorderColor CDATA #REQUIRED + BorderWidth CDATA #REQUIRED + BorderStyle CDATA #REQUIRED + FontFamily CDATA #REQUIRED + FontSize CDATA #REQUIRED + FontWeight CDATA #REQUIRED + FontItalic CDATA #REQUIRED + HAlignment CDATA #REQUIRED + VAlignment CDATA #REQUIRED + WordWrap CDATA #REQUIRED> +</synopsis> + +<variablelist> +<varlistentry> +<term>Attributes</term> +<listitem> + +<variablelist> +<varlistentry> +<term><anchor id="la-text"/><sgmltag class="attribute">Text</sgmltag></term> +<listitem> +<para> +Sets the label's text. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-x"/><sgmltag class="attribute">X</sgmltag></term> +<listitem> +<para> +Sets the x coordinate (relative to the section's upper left corner) for positioning the label. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-y"/><sgmltag class="attribute">Y</sgmltag></term> +<listitem> +<para> +Sets the y coordinate (relative to the section's upper left corner) for positioning the label. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-width"/><sgmltag class="attribute">Width</sgmltag></term> +<listitem> +<para> +Sets the width of the label. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-height"/><sgmltag class="attribute">Height</sgmltag></term> +<listitem> +<para> +Sets the height of the label. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-backgroundcolor"/><sgmltag class="attribute">BackgroundColor</sgmltag></term> +<listitem> +<para> +Sets the background color of the label. The color is defined as an +RGB (Red Green Blue) value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-foregroundcolor"/><sgmltag class="attribute">ForegroundColor</sgmltag></term> +<listitem> +<para> +Sets the foreground color of the label. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-bordercolor"/><sgmltag class="element">BorderColor</sgmltag></term> +<listitem> +<para> +Sets the border color of the label. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-borderwidth"/><sgmltag class="element">BorderWidth</sgmltag></term> +<listitem> +<para> +Sets the border width for the label. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-borderstyle"/><sgmltag class="element">BorderStyle</sgmltag></term> +<listitem> +<para> +Sets the border style for the label. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Border Style</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>None</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Solid</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Dash</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>Dot</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>Dash Dot</entry> +</row> +<row> +<entry><sgmltag class="attvalue">5</sgmltag></entry> +<entry>Dash Dot Dot</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-fontfamily"/><sgmltag class="attribute">FontFamily</sgmltag></term> +<listitem> +<para> +Sets the font family for the label's text. +</para> +<!--<informalexample> +<para>For example: <userinput><sgmltag +class="attribute">FontFamily</sgmltag>="<sgmltag +class="attvalue">Helvetica</sgmltag>"</userinput></para> +</informalexample>--> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-fontsize"/><sgmltag class="attribute">FontSize</sgmltag></term> +<listitem> +<para> +Sets the font size for the label's text. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-fontweight"/><sgmltag class="attribute">FontWeight</sgmltag></term> +<listitem> +<para> +Sets the font weight for the label's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Font Weight</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">25</sgmltag></entry> +<entry>Light</entry> +</row> +<row> +<entry><sgmltag class="attvalue">50</sgmltag></entry> +<entry>Normal</entry> +</row> +<row> +<entry><sgmltag class="attvalue">63</sgmltag></entry> +<entry>Demi Bold</entry> +</row> +<row> +<entry><sgmltag class="attvalue">75</sgmltag></entry> +<entry>Bold</entry> +</row> +<row> +<entry><sgmltag class="attvalue">87</sgmltag></entry> +<entry>Black</entry> +</row> +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-fontitalic"/><sgmltag class="attribute">FontItalic</sgmltag></term> +<listitem> +<para> +Sets the font italic flag for the label's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Italic</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>False</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>True</entry> +</row> +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-halignment"/><sgmltag class="attribute">HAlignment</sgmltag></term> +<listitem> +<para> +Sets the label's horizontal text alignment. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Horizontal Alignment</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>Left</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Center</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Right</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-valignment"/><sgmltag class="attribute">VAlignment</sgmltag></term> +<listitem> +<para> +Sets the label's vertical text alignment. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Vertical Alignment</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>Top</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Middle</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Bottom</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="la-wordwrap"/><sgmltag class="attribute">WordWrap</sgmltag></term> +<listitem> +<para> +Sets the word wrap flag for the label's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Word Wrap</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>False</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>True</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> +</variablelist> +</listitem> +</varlistentry> +</variablelist> + +</sect2> + +<sect2 id="field-element"> +<title><sgmltag class="element">Field</sgmltag></title> + +<para> +The <sgmltag class="element">Field</sgmltag> element defines a report +object used to draw data on a report. +</para> + +<synopsis> +<!ELEMENT Field EMPTY> +<!ATTLIST Field + Field CDATA #REQUIRED + Text CDATA #REQUIRED + X CDATA #REQUIRED + Y CDATA #REQUIRED + Width CDATA #REQUIRED + Height CDATA #REQUIRED + BackgroundColor CDATA #REQUIRED + ForegroundColor CDATA #REQUIRED + BorderColor CDATA #REQUIRED + BorderWidth CDATA #REQUIRED + BorderStyle CDATA #REQUIRED + FontFamily CDATA #REQUIRED + FontSize CDATA #REQUIRED + FontWeight CDATA #REQUIRED + FontItalic CDATA #REQUIRED + HAlignment CDATA #REQUIRED + VAlignment CDATA #REQUIRED + WordWrap CDATA #REQUIRED + DataType CDATA #REQUIRED + DateFormat CDATA #REQUIRED + Precision CDATA #REQUIRED + Currency CDATA #REQUIRED + NegValueColor CDATA #REQUIRED + CommaSeparator CDATA #REQUIRED> +</synopsis> + +<variablelist> +<varlistentry> +<term>Attributes</term> +<listitem> + +<variablelist> +<varlistentry> +<term><anchor id="f-field"/><sgmltag class="attribute">Field</sgmltag></term> +<listitem> +<para> +Sets the data field for the object. This is an attribute of a <sgmltag +class="attribute">row</sgmltag> element in a data file. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-text"/><sgmltag class="attribute">Text</sgmltag></term> +<listitem> +<para> +Not used. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-x"/><sgmltag class="attribute">X</sgmltag></term> +<listitem> +<para> +Sets the x coordinate (relative to the section's upper left corner) for positioning the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-y"/><sgmltag class="attribute">Y</sgmltag></term> +<listitem> +<para> +Sets the y coordinate (relative to the section's upper left corner) for positioning the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-width"/><sgmltag class="attribute">Width</sgmltag></term> +<listitem> +<para> +Sets the width of the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-height"/><sgmltag class="attribute">Height</sgmltag></term> +<listitem> +<para> +Sets the height of the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-backgroundcolor"/><sgmltag class="attribute">BackgroundColor</sgmltag></term> +<listitem> +<para> +Sets the background color of the field. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-foregroundcolor"/><sgmltag class="attribute">ForegroundColor</sgmltag></term> +<listitem> +<para> +Sets the foreground color of the field. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-bordercolor"/><sgmltag class="attribute">BorderColor</sgmltag></term> +<listitem> +<para> +Sets the border color of the field. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-borderwidth"/><sgmltag class="element">BorderWidth</sgmltag></term> +<listitem> +<para> +Sets the border width for the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-borderstyle"/><sgmltag class="element">BorderStyle</sgmltag></term> +<listitem> +<para> +Sets the border style for the field. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Border Style</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>None</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Solid</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Dash</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>Dot</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>Dash Dot</entry> +</row> +<row> +<entry><sgmltag class="attvalue">5</sgmltag></entry> +<entry>Dash Dot Dot</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-fontfamily"/><sgmltag class="attribute">FontFamily</sgmltag></term> +<listitem> +<para> +Sets the font family for the field's text. +</para> +<!--<informalexample> +<para><userinput><sgmltag +class="attribute">FontFamily</sgmltag>="<sgmltag +class="attvalue">Helvetica</sgmltag>"</userinput></para> +</informalexample>--> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-fontsize"/><sgmltag class="attribute">FontSize</sgmltag></term> +<listitem> +<para> +Sets the font size for the field's text. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-fontweight"/><sgmltag class="attribute">FontWeight</sgmltag></term> +<listitem> +<para> +Sets the font weight for the field's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Font Weight</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">25</sgmltag></entry> +<entry>Light</entry> +</row> +<row> +<entry><sgmltag class="attvalue">50</sgmltag></entry> +<entry>Normal</entry> +</row> +<row> +<entry><sgmltag class="attvalue">63</sgmltag></entry> +<entry>Demi Bold</entry> +</row> +<row> +<entry><sgmltag class="attvalue">75</sgmltag></entry> +<entry>Bold</entry> +</row> +<row> +<entry><sgmltag class="attvalue">87</sgmltag></entry> +<entry>Black</entry> +</row> +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-fontitalic"/><sgmltag class="attribute">FontItalic</sgmltag></term> +<listitem> +<para> +Sets the font italic flag for the field's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Italic</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>False</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>True</entry> +</row> +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-halignment"/><sgmltag class="attribute">HAlignment</sgmltag></term> +<listitem> +<para> +Sets the field's horizontal text alignment. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Horizontal Alignment</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>Left</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Center</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Right</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-valignment"/><sgmltag class="attribute">VAlignment</sgmltag></term> +<listitem> +<para> +Sets the field's vertical text alignment +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Vertical Alignment</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>Top</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Middle</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Bottom</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-wordwrap"/><sgmltag class="attribute">WordWrap</sgmltag></term> +<listitem> +<para> +Sets the word wrap flag for the field's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Word Wrap</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>False</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>True</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> +<!--</variablelist> +</listitem> +</varlistentry>--> + +<varlistentry> +<term><anchor id="f-datatype"/><sgmltag class="attribute">DataType</sgmltag></term> +<listitem> +<para> +Sets the field's data type. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Data Type</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>String</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Integer</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Float</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>Date</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>Currency</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-dateformat"/><sgmltag class="attribute">DateFormat</sgmltag></term> +<listitem> +<para> +Sets the field's date format. For this to work, the format of the date +from the data document must be in the format mm/dd/yyyy or mm-dd-yyyy, +otherwise the original date format is used. If the data type is other than +date, set this to <sgmltag class="attvalue">0</sgmltag>. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Date Format</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>m/d/yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>m-d-yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>mm/dd/yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>mm-dd-yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>m/d/yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">5</sgmltag></entry> +<entry>m-d-yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">6</sgmltag></entry> +<entry>mm/dd/yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">7</sgmltag></entry> +<entry>mm-dd-yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">8</sgmltag></entry> +<entry>yyyy/m/d</entry> +</row> +<row> +<entry><sgmltag class="attvalue">9</sgmltag></entry> +<entry>yyyy-m-d</entry> +</row> +<row> +<entry><sgmltag class="attvalue">10</sgmltag></entry> +<entry>dd.mm.yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">11</sgmltag></entry> +<entry>dd.mm.yyyy</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-precision"/><sgmltag class="attribute">Precision</sgmltag></term> +<listitem> +<para> +Sets the field's numeric precision. If the data type is other than a numeric +type, set this to 0. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-currency"/><sgmltag class="attribute">Currency</sgmltag></term> +<listitem> +<para> +Sets the field's currency symbol If the data type is other than currency, set +this to <sgmltag class="attvalue">36</sgmltag> ($). The value is a number +representing a Unicode character. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-negvaluecolor"/><sgmltag class="attribute">NegValueColor</sgmltag></term> +<listitem> +<para> +Sets the color for negative numeric values. The color is defined as an +RGB (Red Green Blue) value (r,g,b). r, g and b must be in the range 0..255. If data is +other than a numeric type, set to 255,0,0. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="f-commaseparator"/><sgmltag class="attribute">CommaSeparator</sgmltag></term> +<listitem> +<para> +Sets whether commas are used in numeric fields. If the data type is other than +a numeric type, set this to <sgmltag class="attvalue">0</sgmltag>. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Comma Separator</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>False</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>True</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> +</variablelist> +</listitem> +</varlistentry> +</variablelist> + +</sect2> + +<sect2 id="calculated-field-element"> +<title><sgmltag class="element">CalculatedField</sgmltag></title> + +<para> +The <sgmltag class="element">CalculatedField</sgmltag> element defines a report +object used to draw calculated values on a report. +</para> + +<synopsis> +<!ELEMENT CalculatedField EMPTY> +<!ATTLIST CalculatedField + CalculationType CDATA #REQUIRED + Field CDATA #REQUIRED + Text CDATA #REQUIRED + X CDATA #REQUIRED + Y CDATA #REQUIRED + Width CDATA #REQUIRED + Height CDATA #REQUIRED + BackgroundColor CDATA #REQUIRED + ForegroundColor CDATA #REQUIRED + BorderColor CDATA #REQUIRED + BorderWidth CDATA #REQUIRED + BorderStyle CDATA #REQUIRED + FontFamily CDATA #REQUIRED + FontSize CDATA #REQUIRED + FontWeight CDATA #REQUIRED + FontItalic CDATA #REQUIRED + HAlignment CDATA #REQUIRED + VAlignment CDATA #REQUIRED + WordWrap CDATA #REQUIRED + DataType CDATA #REQUIRED + DateFormat CDATA #REQUIRED + Precision CDATA #REQUIRED + Currency CDATA #REQUIRED + NegValueColor CDATA #REQUIRED + CommaSeparator CDATA #REQUIRED> +</synopsis> + +<variablelist> +<varlistentry> +<term>Attributes</term> +<listitem> + +<variablelist> +<varlistentry> +<term><anchor id="c-calculationtype"/><sgmltag class="attribute">CalculationType</sgmltag></term> +<listitem> +<para> +Sets the calculation type for the field. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Calculation</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>Count</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Sum</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Average</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>Variance</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>Std Deviation</entry> +</row> +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-field"/><sgmltag class="attribute">Field</sgmltag></term> +<listitem> +<para> +Sets the data field for the object. This is an attribute of a <sgmltag +class="attribute">row</sgmltag> element in a data file. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-text"/><sgmltag class="attribute">Text</sgmltag></term> +<listitem> +<para> +Not used. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-x"/><sgmltag class="attribute">X</sgmltag></term> +<listitem> +<para> +Sets the x coordinate (relative to the section's upper left corner) for positioning the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-y"/><sgmltag class="attribute">Y</sgmltag></term> +<listitem> +<para> +Sets the y coordinate (relative to the section's upper left corner) for positioning the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-width"/><sgmltag class="attribute">Width</sgmltag></term> +<listitem> +<para> +Sets the width of the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-height"/><sgmltag class="attribute">Height</sgmltag></term> +<listitem> +<para> +Sets the height of the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-backgroundcolor"/><sgmltag class="attribute">BackgroundColor</sgmltag></term> +<listitem> +<para> +Sets the background color of the field. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-foregroundcolor"/><sgmltag class="attribute">ForegroundColor</sgmltag></term> +<listitem> +<para> +Sets the foreground color of the field. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-bordercolor"/><sgmltag class="attribute">BorderColor</sgmltag></term> +<listitem> +<para> +Sets the border color of the field. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-borderwidth"/><sgmltag class="element">BorderWidth</sgmltag></term> +<listitem> +<para> +Sets the border width for the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-borderstyle"/><sgmltag class="element">BorderStyle</sgmltag></term> +<listitem> +<para> +Sets the border style for the field. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Border Style</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>None</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Solid</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Dash</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>Dot</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>Dash Dot</entry> +</row> +<row> +<entry><sgmltag class="attvalue">5</sgmltag></entry> +<entry>Dash Dot Dot</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-fontfamily"/><sgmltag class="attribute">FontFamily</sgmltag></term> +<listitem> +<para> +Sets the font family for the field's text. +</para> +<!--<informalexample> +<para><userinput><sgmltag +class="attribute">FontFamily</sgmltag>="<sgmltag +class="attvalue">Helvetica</sgmltag>"</userinput></para> +</informalexample>--> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-fontsize"/><sgmltag class="attribute">FontSize</sgmltag></term> +<listitem> +<para> +Sets the font size for the field's text. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-fontweight"/><sgmltag class="attribute">FontWeight</sgmltag></term> +<listitem> +<para> +Sets the font weight for the field's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Font Weight</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">25</sgmltag></entry> +<entry>Light</entry> +</row> +<row> +<entry><sgmltag class="attvalue">50</sgmltag></entry> +<entry>Normal</entry> +</row> +<row> +<entry><sgmltag class="attvalue">63</sgmltag></entry> +<entry>Demi Bold</entry> +</row> +<row> +<entry><sgmltag class="attvalue">75</sgmltag></entry> +<entry>Bold</entry> +</row> +<row> +<entry><sgmltag class="attvalue">87</sgmltag></entry> +<entry>Black</entry> +</row> +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-fontitalic"/><sgmltag class="attribute">FontItalic</sgmltag></term> +<listitem> +<para> +Sets the font italic flag for the field's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Italic</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>False</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>True</entry> +</row> +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-halignment"/><sgmltag class="attribute">HAlignment</sgmltag></term> +<listitem> +<para> +Sets the field's horizontal text alignment. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Horizontal Alignment</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>Left</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Center</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Right</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-valignment"/><sgmltag class="attribute">VAlignment</sgmltag></term> +<listitem> +<para> +Sets the field's vertical text alignment. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Vertical Alignment</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>Top</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Middle</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Bottom</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-wordwrap"/><sgmltag class="attribute">WordWrap</sgmltag></term> +<listitem> +<para> +Sets the word wrap flag for the field's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Word Wrap</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>False</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>True</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-datatype"/><sgmltag class="attribute">DataType</sgmltag></term> +<listitem> +<para> +Sets the field's data type. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Data Type</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>String</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Integer</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Float</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>Date</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>Currency</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-dateformat"/><sgmltag class="attribute">DateFormat</sgmltag></term> +<listitem> +<para> +Sets the field's date format. For this to work, the format of the date +from the data document must be in the format mm/dd/yyyy or mm-dd-yyyy, +otherwise the original date format is used. If the data type is other than +date, set this to <sgmltag class="attvalue">0</sgmltag>. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Date Format</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>m/d/yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>m-d-yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>mm/dd/yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>mm-dd-yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>m/d/yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">5</sgmltag></entry> +<entry>m-d-yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">6</sgmltag></entry> +<entry>mm/dd/yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">7</sgmltag></entry> +<entry>mm-dd-yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">8</sgmltag></entry> +<entry>yyyy/m/d</entry> +</row> +<row> +<entry><sgmltag class="attvalue">9</sgmltag></entry> +<entry>yyyy-m-d</entry> +</row> +<row> +<entry><sgmltag class="attvalue">10</sgmltag></entry> +<entry>dd.mm.yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">11</sgmltag></entry> +<entry>dd.mm.yyyy</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-precision"/><sgmltag class="attribute">Precision</sgmltag></term> +<listitem> +<para> +Sets the field's numeric precision. If the data type is other than a numeric +type, set this to 0. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-currency"/><sgmltag class="attribute">Currency</sgmltag></term> +<listitem> +<para> +Sets the field's currency symbol. If the data type is other than currency, set +this to <sgmltag class="attvalue">36</sgmltag> ($). The value is a number +representing an unicode character. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-negvaluecolor"/><sgmltag class="attribute">NegValueColor</sgmltag></term> +<listitem> +<para> +Sets the color for negative numeric values. The color is defined as an +RGB (Red Green Blue) value (r,g,b). r, g and b must be in the range 0..255. If data is +other than a numeric type, set to 255,0,0. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="c-commaseparator"/><sgmltag class="attribute">CommaSeparator</sgmltag></term> +<listitem> +<para> +Sets whether commas are used in numeric fields. If the data type is other than +a numeric type, set this to <sgmltag class="attvalue">0</sgmltag>. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Comma Separator</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>False</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>True</entry> +</row> +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> +</variablelist> +</listitem> +</varlistentry> +</variablelist> + +</sect2> + +<sect2 id="special-element"> +<title><sgmltag class="element">Special</sgmltag></title> + +<para> +The <sgmltag class="element">Special</sgmltag> element defines a report +object used to draw page numbers and the current date on a report. +</para> + +<synopsis> +<!ELEMENT Special EMPTY> +<!ATTLIST Special + Type CDATA #REQUIRED + Text CDATA #REQUIRED + X CDATA #REQUIRED + Y CDATA #REQUIRED + Width CDATA #REQUIRED + Height CDATA #REQUIRED + BackgroundColor CDATA #REQUIRED + ForegroundColor CDATA #REQUIRED + BorderColor CDATA #REQUIRED + BorderWidth CDATA #REQUIRED + BorderStyle CDATA #REQUIRED + FontFamily CDATA #REQUIRED + FontSize CDATA #REQUIRED + FontWeight CDATA #REQUIRED + FontItalic CDATA #REQUIRED + HAlignment CDATA #REQUIRED + VAlignment CDATA #REQUIRED + WordWrap CDATA #REQUIRED + DateFormat CDATA #REQUIRED> +</synopsis> + +<variablelist> +<varlistentry> +<term>Attributes</term> +<listitem> + +<variablelist> +<varlistentry> +<term><anchor id="s-type"/><sgmltag class="attribute">Type</sgmltag></term> +<listitem> +<para> +Sets the type of special object. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Type</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>Current Date</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Page Number</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-text"/><sgmltag class="attribute">Text</sgmltag></term> +<listitem> +<para> +Not used. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-x"/><sgmltag class="attribute">X</sgmltag></term> +<listitem> +<para> +Sets the x coordinate (relative to the section's upper left corner) for positioning the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-y"/><sgmltag class="attribute">Y</sgmltag></term> +<listitem> +<para> +Sets the y coordinate (relative to the section's upper left corner) for positioning the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-width"/><sgmltag class="attribute">Width</sgmltag></term> +<listitem> +<para> +Sets the width of the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-height"/><sgmltag class="attribute">Height</sgmltag></term> +<listitem> +<para> +Sets the height of the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-backgroundcolor"/><sgmltag class="attribute">BackgroundColor</sgmltag></term> +<listitem> +<para> +Sets the background color of the field. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-foregroundcolor"/><sgmltag class="attribute">ForegroundColor</sgmltag></term> +<listitem> +<para> +Sets the foreground color of the field. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + + +<varlistentry> +<term><anchor id="s-bordercolor"/><sgmltag class="attribute">BorderColor</sgmltag></term> +<listitem> +<para> +Sets the border color of the field. The color is defined as an RGB (Red Green Blue) +value (r,g,b). r, g and b must be in the range 0..255. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-borderwidth"/><sgmltag class="element">BorderWidth</sgmltag></term> +<listitem> +<para> +Sets the border width for the field. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-borderstyle"/><sgmltag class="element">BorderStyle</sgmltag></term> +<listitem> +<para> +Sets the border style for the field. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Border Style</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>None</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Solid</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Dash</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>Dot</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>Dash Dot</entry> +</row> +<row> +<entry><sgmltag class="attvalue">5</sgmltag></entry> +<entry>Dash Dot Dot</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-fontfamily"/><sgmltag class="attribute">FontFamily</sgmltag></term> +<listitem> +<para> +Sets the font family for the field's text. +</para> +<!--<informalexample> +<para><userinput><sgmltag +class="attribute">FontFamily</sgmltag>="<sgmltag +class="attvalue">Helvetica</sgmltag>"</userinput></para> +</informalexample>--> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-fontsize"/><sgmltag class="attribute">FontSize</sgmltag></term> +<listitem> +<para> +Sets the font size for the field's text. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-fontweight"/><sgmltag class="attribute">FontWeight</sgmltag></term> +<listitem> +<para> +Sets the font weight for the field's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Font Weight</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">25</sgmltag></entry> +<entry>Light</entry> +</row> +<row> +<entry><sgmltag class="attvalue">50</sgmltag></entry> +<entry>Normal</entry> +</row> +<row> +<entry><sgmltag class="attvalue">63</sgmltag></entry> +<entry>Demi Bold</entry> +</row> +<row> +<entry><sgmltag class="attvalue">75</sgmltag></entry> +<entry>Bold</entry> +</row> +<row> +<entry><sgmltag class="attvalue">87</sgmltag></entry> +<entry>Black</entry> +</row> +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-fontitalic"/><sgmltag class="attribute">FontItalic</sgmltag></term> +<listitem> +<para> +Sets the font italic flag for the field's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Italic</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>False</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>True</entry> +</row> +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-halignment"/><sgmltag class="attribute">HAlignment</sgmltag></term> +<listitem> +<para> +Sets the field's horizontal text alignment. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Horizontal Alignment</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>Left</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Center</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Right</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-valignment"/><sgmltag class="attribute">VAlignment</sgmltag></term> +<listitem> +<para> +Sets the field's vertical text alignment. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Vertical Alignment</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>Top</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>Middle</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>Bottom</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-wordwrap"/><sgmltag class="attribute">WordWrap</sgmltag></term> +<listitem> +<para> +Sets the word wrap flag for the field's text. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Word Wrap</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>False</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>True</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-dateformat"/><sgmltag class="attribute">DateFormat</sgmltag></term> +<listitem> +<para> +Sets the field's date format. For this to work, the format of the date +from the data document must be in the format mm/dd/yyyy or mm-dd-yyyy, +otherwise the original date format is used. If the data type is other than +date, set this to <sgmltag class="attvalue">0</sgmltag>. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Date Format</entry> +</row> +</thead> +<tbody> +<row> +<entry><sgmltag class="attvalue">0</sgmltag></entry> +<entry>m/d/yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">1</sgmltag></entry> +<entry>m-d-yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">2</sgmltag></entry> +<entry>mm/dd/yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">3</sgmltag></entry> +<entry>mm-dd-yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">4</sgmltag></entry> +<entry>m/d/yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">5</sgmltag></entry> +<entry>m-d-yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">6</sgmltag></entry> +<entry>mm/dd/yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">7</sgmltag></entry> +<entry>mm-dd-yyyy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">8</sgmltag></entry> +<entry>yyyy/m/d</entry> +</row> +<row> +<entry><sgmltag class="attvalue">9</sgmltag></entry> +<entry>yyyy-m-d</entry> +</row> +<row> +<entry><sgmltag class="attvalue">10</sgmltag></entry> +<entry>dd.mm.yy</entry> +</row> +<row> +<entry><sgmltag class="attvalue">11</sgmltag></entry> +<entry>dd.mm.yyyy</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="s-precision"/><sgmltag class="attribute">Precision</sgmltag></term> +<listitem> +<para> +Sets the field's numeric precision. If the data type is other than a numeric +type, set this to 0. +</para> +</listitem> +</varlistentry> +</variablelist> +</listitem> +</varlistentry> +</variablelist> + +</sect2> + +</sect1> + + + diff --git a/doc/kugar/template.docbook b/doc/kugar/template.docbook new file mode 100644 index 00000000..f5299fce --- /dev/null +++ b/doc/kugar/template.docbook @@ -0,0 +1,357 @@ +<!-- If you want to edit or validate this document separately, uncomment +this prolog +<?xml version="1.0" ?> +<!DOCTYPE chapter PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd"> +--> +<sect1 id="kugartemplate"> +<sect1info> +<authorgroup> +<author> +<firstname>Alexander</firstname> +<surname>Dymo</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<author> +<firstname>Phil</firstname> +<surname>Thompson</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> +</sect1info> +<title><sgmltag class="element">KugarTemplate</sgmltag> element</title> + +<para> +The <sgmltag class="element">KugarTemplate</sgmltag> element defines +report attributes relating to page size, orientation, and margins. +</para> + +<synopsis> +<!ELEMENT KugarTemplate (<link linkend="report-header-and-footer">ReportHeader</link>, <link linkend="page-header-and-footer">PageHeader</link>, <link linkend="detail-header-and-footer">DetailHeader</link>*, <link linkend="detail">Detail</link>*, <link linkend="detail-header-and-footer">DetailFooter</link>*, <link linkend="page-header-and-footer">PageFooter</link>, <link linkend="report-header-and-footer">ReportFooter</link>)> +<!ATTLIST KugarTemplate +PageSize CDATA #REQUIRED +PageOrientation CDATA #REQUIRED +TopMargin CDATA #REQUIRED +BottomMargin CDATA #REQUIRED +LeftMargin CDATA #REQUIRED +RightMargin CDATA #REQUIRED> +</synopsis> + +<variablelist> + +<varlistentry> +<term>Elements</term> + +<listitem> + +<para> +The <sgmltag class="element">KugarTemplate</sgmltag> element contains +the following elements: +</para> + +<variablelist> +<varlistentry> +<term><link linkend="report-header-and-footer"><sgmltag class="element">ReportHeader</sgmltag></link></term> +<listitem> +<para> +The <sgmltag class="element">ReportHeader</sgmltag> element defines +report sections that are usually printed at the beginning of the report. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><link linkend="page-header-and-footer"><sgmltag class="element">PageHeader</sgmltag></link></term> +<listitem> +<para> +The <sgmltag class="element">PageHeader</sgmltag> element defines report +sections that are usually printed at the top of every page of the +report. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><link linkend="detail-header-and-footer"><sgmltag class="element">DetailHeader</sgmltag></link></term> +<listitem> +<para> +The <sgmltag class="element">DetailHeader</sgmltag> element defines report +sections that are printed before details of a given level on the report. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><link linkend="detail"><sgmltag class="element">Detail</sgmltag></link></term> +<listitem> +<para> +The <sgmltag class="element">Detail</sgmltag> element defines the report +section that contains the report data. The report can have an unlimited number +of details. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><link linkend="detail-header-and-footer"><sgmltag class="element">DetailFooter</sgmltag></link></term> +<listitem> +<para> +The <sgmltag class="element">DetailFooter</sgmltag> element defines report +sections that are printed after details of a given level and below on the report. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><link linkend="page-header-and-footer"><sgmltag class="element">PageFooter</sgmltag></link></term> +<listitem> +<para> +The <sgmltag class="element">PageFooter</sgmltag> element defines report +sections that are usually printed at the end of every page in the +report. +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><link linkend="report-header-and-footer"><sgmltag class="element">ReportFooter</sgmltag></link></term> +<listitem> +<para> +The <sgmltag class="element">ReportFooter</sgmltag> element defines report +sections that are usually printed at the end of the report. +</para> +</listitem> +</varlistentry> + +</variablelist> + +</listitem> + +</varlistentry> + +<varlistentry> +<term>Attributes</term> +<listitem> + +<variablelist> +<varlistentry> +<term><anchor id="kut-pagesize"/><sgmltag class="attribute">PageSize</sgmltag></term> +<listitem> +<para> +Sets the size of the report page. The following values are available: +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Page Size</entry> +</row> +</thead> + +<tbody> +<row> +<entry>0</entry> +<entry>A4</entry> +</row> +<row> +<entry>1</entry> +<entry>B5</entry> +</row> +<row> +<entry>2</entry> +<entry>Letter</entry> +</row> +<row> +<entry>3</entry> +<entry>Legal</entry> +</row> +<row> +<entry>4</entry> +<entry>Executive</entry> +</row> +<row> +<entry>5</entry> +<entry>A0</entry> +</row> +<row> +<entry>6</entry> +<entry>A1</entry> +</row> +<row> +<entry>7</entry> +<entry>A2</entry> +</row> +<row> +<entry>8</entry> +<entry>A3</entry> +</row> +<row> +<entry>9</entry> +<entry>A5</entry> +</row> +<row> +<entry>10</entry> +<entry>A6</entry> +</row> +<row> +<entry>11</entry> +<entry>A7</entry> +</row> +<row> +<entry>12</entry> +<entry>A8</entry> +</row> +<row> +<entry>13</entry> +<entry>A9</entry> +</row> +<row> +<entry>14</entry> +<entry>B0</entry> +</row> +<row> +<entry>15</entry> +<entry>B1</entry> +</row> +<row> +<entry>16</entry> +<entry>B10</entry> +</row> +<row> +<entry>17</entry> +<entry>B2</entry> +</row> +<row> +<entry>18</entry> +<entry>B3</entry> +</row> +<row> +<entry>19</entry> +<entry>B4</entry> +</row> +<row> +<entry>20</entry> +<entry>B6</entry> +</row> +<row> +<entry>21</entry> +<entry>B7</entry> +</row> +<row> +<entry>22</entry> +<entry>B8</entry> +</row> +<row> +<entry>23</entry> +<entry>B9</entry> +</row> +<row> +<entry>24</entry> +<entry>C5E</entry> +</row> +<row> +<entry>25</entry> +<entry>Comm10E</entry> +</row> +<row> +<entry>26</entry> +<entry>DLE</entry> +</row> +<row> +<entry>27</entry> +<entry>Folio</entry> +</row> +<row> +<entry>28</entry> +<entry>Ledger</entry> +</row> +<row> +<entry>29</entry> +<entry>Tabloid</entry> +</row> +<row> +<entry>30</entry> +<entry>NPageSize</entry> +</row> + +</tbody> +</tgroup> +</informaltable> + +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="kut-pageorient"/><sgmltag class="attribute">PageOrientation</sgmltag></term> +<listitem> +<para> +Sets the report page orientation. +</para> + +<informaltable> +<tgroup cols="2"> +<thead> +<row> +<entry>Value</entry> +<entry>Orientation</entry> +</row> +</thead> +<tbody> +<row> +<entry>0</entry> +<entry>Portrait</entry> +</row> +<row> +<entry>1</entry> +<entry>Landscape</entry> +</row> +</tbody> +</tgroup> +</informaltable> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="kut-topmargin"/><sgmltag class="attribute">TopMargin</sgmltag></term> +<listitem> +<para> +Sets the top margin of the report page. <!-- in what scale? --> +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="kut-botmargin"/><sgmltag class="attribute">BottomMargin</sgmltag></term> +<listitem> +<para> +Sets the bottom margin of the report page. <!-- in what scale? --> +</para> +</listitem> +</varlistentry> + +<varlistentry> +<term><anchor id="kut-leftmargin"/><sgmltag class="attribute">LeftMargin</sgmltag></term> +<listitem> +<para> +Sets the left margin of the report page. <!-- in what scale? --> +</para> +</listitem> +</varlistentry><varlistentry> +<term><anchor id="kut-rightmargin"/><sgmltag class="attribute">RightMargin</sgmltag></term> +<listitem> +<para> +Sets the right margin of the report page. <!-- in what scale? --> +</para> +</listitem> +</varlistentry> +</variablelist> +</listitem> +</varlistentry> +</variablelist> +</sect1> diff --git a/doc/kugar/templatedtd.docbook b/doc/kugar/templatedtd.docbook new file mode 100644 index 00000000..70d75015 --- /dev/null +++ b/doc/kugar/templatedtd.docbook @@ -0,0 +1,188 @@ +<!-- If you want to validate or edit this document separately, uncomment +this prolog + +<?xml version="1.0" ?> +<!DOCTYPE appendix PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd"> + +--> + +<sect1 id="template-dtd"> +<sect1info> +<authorgroup> +<author> +<firstname>Alexander</firstname> +<surname>Dymo</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<author> +<firstname>Phil</firstname> +<surname>Thompson</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> +</sect1info> +<title>The KugarTemplate Document Type Definition</title> + +<synopsis> + +<?xml version="1.0" encoding="UTF-8"?> + +<!DOCTYPE KugarTemplate [ + <!ELEMENT <link linkend="kugartemplate">KugarTemplate</link> (<link linkend="report-header-and-footer">ReportHeader</link>, <link linkend="page-header-and-footer">PageHeader</link>, <link linkend="detail-header-and-footer">DetailHeader</link>*, <link linkend="detail">Detail</link>*, <link linkend="detail-header-and-footer">DetailFooter</link>*, <link linkend="page-header-and-footer">PageFooter</link>, <link linkend="report-header-and-footer">ReportFooter</link>)> + <!ATTLIST KugarTemplate + <link linkend="kut-pagesize">PageSize</link> CDATA #REQUIRED + <link linkend="kut-pageorient">PageOrientation</link> CDATA #REQUIRED + <link linkend="kut-topmargin">TopMargin</link> CDATA #REQUIRED + <link linkend="kut-botmargin">BottomMargin</link> CDATA #REQUIRED + <link linkend="kut-leftmargin">LeftMargin</link> CDATA #REQUIRED + <link linkend="kut-rightmargin">RightMargin</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="report-header-and-footer">ReportHeader</link> (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*)> + <!ATTLIST ReportHeader + <link linkend="rhf-height">Height</link> CDATA #REQUIRED + <link linkend="rhf-printfrequency">PrintFrequency</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="page-header-and-footer">PageHeader</link> (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*)> + <!ATTLIST PageHeader + <link linkend="phf-height">Height</link> CDATA #REQUIRED + <link linkend="phf-printfrequency">PrintFrequency</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="detail-header-and-footer">DetailHeader</link> (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*)> + <!ATTLIST DetailHeader + <link linkend="dhf-height">Height</link> CDATA #REQUIRED + <link linkend="dhf-level">Level</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="detail">Detail</link> (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*, <link linkend="field-element">Field</link>*)> + <!ATTLIST Detail + <link linkend="d-height">Height</link> CDATA #REQUIRED + <link linkend="d-level">Level</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="detail-header-and-footer">DetailFooter</link> (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*)> + <!ATTLIST DetailFooter + <link linkend="dhf-height">Height</link> CDATA #REQUIRED + <link linkend="dhf-level">Level</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="page-header-and-footer">PageFooter</link> (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*)> + <!ATTLIST PageFooter + <link linkend="phf-height">Height</link> CDATA #REQUIRED + <link linkend="phf-printfrequency">PrintFrequency</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="report-header-and-footer">ReportFooter</link> (<link linkend="line-element">Line</link>*, <link linkend="label-element">Label</link>*, <link linkend="special-element">Special</link>*, <link linkend="calculated-field-element">CalculatedField</link>*)> + <!ATTLIST ReportFooter + <link linkend="rhf-height">Height</link> CDATA #REQUIRED + <link linkend="rhf-printfrequency">PrintFrequency</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="line-element">Line</link> EMPTY> + <!ATTLIST Line + <link linkend="l-x1">X1</link> CDATA #REQUIRED + <link linkend="l-y1">Y1</link> CDATA #REQUIRED + <link linkend="l-x2">X2</link> CDATA #REQUIRED + <link linkend="l-y2">Y2</link> CDATA #REQUIRED + <link linkend="l-width">Width</link> CDATA #REQUIRED + <link linkend="l-color">Color</link> CDATA #REQUIRED + <link linkend="l-style">Style</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="label-element">Label</link> EMPTY> + <!ATTLIST Label + <link linkend="la-text">Text</link> CDATA #REQUIRED + <link linkend="la-x">X</link> CDATA #REQUIRED + <link linkend="la-y">Y</link> CDATA #REQUIRED + <link linkend="la-width">Width</link> CDATA #REQUIRED + <link linkend="la-height">Height</link> CDATA #REQUIRED + <link linkend="la-backgroundcolor">BackgroundColor</link> CDATA #REQUIRED + <link linkend="la-foregroundcolor">ForegroundColor</link> CDATA #REQUIRED + <link linkend="la-bordercolor">BorderColor</link> CDATA #REQUIRED + <link linkend="la-borderwidth">BorderWidth</link> CDATA #REQUIRED + <link linkend="la-borderstyle">BorderStyle</link> CDATA #REQUIRED + <link linkend="la-fontfamily">FontFamily</link> CDATA #REQUIRED + <link linkend="la-fontsize">FontSize</link> CDATA #REQUIRED + <link linkend="la-fontweight">FontWeight</link> CDATA #REQUIRED + <link linkend="la-fontitalic">FontItalic</link> CDATA #REQUIRED + <link linkend="la-halignment">HAlignment</link> CDATA #REQUIRED + <link linkend="la-valignment">VAlignment</link> CDATA #REQUIRED + <link linkend="la-wordwrap">WordWrap</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="field-element">Field</link> EMPTY> + <!ATTLIST Field + <link linkend="f-field">Field</link> CDATA #REQUIRED + <link linkend="f-text">Text</link> CDATA #REQUIRED + <link linkend="f-x">X</link> CDATA #REQUIRED + <link linkend="f-y">Y</link> CDATA #REQUIRED + <link linkend="f-width">Width</link> CDATA #REQUIRED + <link linkend="f-height">Height</link> CDATA #REQUIRED + <link linkend="f-backgroundcolor">BackgroundColor</link> CDATA #REQUIRED + <link linkend="f-foregroundcolor">ForegroundColor</link> CDATA #REQUIRED + <link linkend="f-bordercolor">BorderColor</link> CDATA #REQUIRED + <link linkend="f-borderwidth">BorderWidth</link> CDATA #REQUIRED + <link linkend="f-borderstyle">BorderStyle</link> CDATA #REQUIRED + <link linkend="f-fontfamily">FontFamily</link> CDATA #REQUIRED + <link linkend="f-fontsize">FontSize</link> CDATA #REQUIRED + <link linkend="f-fontweight">FontWeight</link> CDATA #REQUIRED + <link linkend="f-fontitalic">FontItalic</link> CDATA #REQUIRED + <link linkend="f-halignment">HAlignment</link> CDATA #REQUIRED + <link linkend="f-valignment">VAlignment</link> CDATA #REQUIRED + <link linkend="f-wordwrap">WordWrap</link> CDATA #REQUIRED + <link linkend="f-datatype">DataType</link> CDATA #REQUIRED + <link linkend="f-dateformat">DateFormat</link> CDATA #REQUIRED + <link linkend="f-precision">Precision</link> CDATA #REQUIRED + <link linkend="f-currency">Currency</link> CDATA #REQUIRED + <link linkend="f-negvaluecolor">NegValueColor</link> CDATA #REQUIRED + <link linkend="f-commaseparator">CommaSeparator</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="calculated-field-element">CalculatedField</link> EMPTY> + <!ATTLIST CalculatedField + <link linkend="c-calculationtype">CalculationType</link> CDATA #REQUIRED + <link linkend="c-field">Field</link> CDATA #REQUIRED + <link linkend="c-text">Text</link> CDATA #REQUIRED + <link linkend="c-x">X</link> CDATA #REQUIRED + <link linkend="c-y">Y</link> CDATA #REQUIRED + <link linkend="c-width">Width</link> CDATA #REQUIRED + <link linkend="c-height">Height</link> CDATA #REQUIRED + <link linkend="c-backgroundcolor">BackgroundColor</link> CDATA #REQUIRED + <link linkend="c-foregroundcolor">ForegroundColor</link> CDATA #REQUIRED + <link linkend="c-bordercolor">BorderColor</link> CDATA #REQUIRED + <link linkend="c-borderwidth">BorderWidth</link> CDATA #REQUIRED + <link linkend="c-borderstyle">BorderStyle</link> CDATA #REQUIRED + <link linkend="c-fontfamily">FontFamily</link> CDATA #REQUIRED + <link linkend="c-fontsize">FontSize</link> CDATA #REQUIRED + <link linkend="c-fontweight">FontWeight</link> CDATA #REQUIRED + <link linkend="c-fontitalic">FontItalic</link> CDATA #REQUIRED + <link linkend="c-halignment">HAlignment</link> CDATA #REQUIRED + <link linkend="c-valignment">VAlignment</link> CDATA #REQUIRED + <link linkend="c-wordwrap">WordWrap</link> CDATA #REQUIRED + <link linkend="c-datatype">DataType</link> CDATA #REQUIRED + <link linkend="c-dateformat">DateFormat</link> CDATA #REQUIRED + <link linkend="c-precision">Precision</link> CDATA #REQUIRED + <link linkend="c-currency">Currency</link> CDATA #REQUIRED + <link linkend="c-negvaluecolor">NegValueColor</link> CDATA #REQUIRED + <link linkend="c-commaseparator">CommaSeparator</link> CDATA #REQUIRED> + + <!ELEMENT <link linkend="special-element">Special</link> EMPTY> + <!ATTLIST Special + <link linkend="s-type">Type</link> CDATA #REQUIRED + <link linkend="s-text">Text</link> CDATA #REQUIRED + <link linkend="s-x">X</link> CDATA #REQUIRED + <link linkend="s-y">Y</link> CDATA #REQUIRED + <link linkend="s-width">Width</link> CDATA #REQUIRED + <link linkend="s-height">Height</link> CDATA #REQUIRED + <link linkend="s-backgroundcolor">BackgroundColor</link> CDATA #REQUIRED + <link linkend="s-foregroundcolor">ForegroundColor</link> CDATA #REQUIRED + <link linkend="s-bordercolor">BorderColor</link> CDATA #REQUIRED + <link linkend="s-borderwidth">BorderWidth</link> CDATA #REQUIRED + <link linkend="s-borderstyle">BorderStyle</link> CDATA #REQUIRED + <link linkend="s-fontfamily">FontFamily</link> CDATA #REQUIRED + <link linkend="s-fontsize">FontSize</link> CDATA #REQUIRED + <link linkend="s-fontweight">FontWeight</link> CDATA #REQUIRED + <link linkend="s-fontitalic">FontItalic</link> CDATA #REQUIRED + <link linkend="s-halignment">HAlignment</link> CDATA #REQUIRED + <link linkend="s-valignment">VAlignment</link> CDATA #REQUIRED + <link linkend="s-wordwrap">WordWrap</link> CDATA #REQUIRED + <link linkend="s-dateformat">DateFormat</link> CDATA #REQUIRED> + ]> +</synopsis> +</sect1> diff --git a/doc/kugar/tut_edit_height.png b/doc/kugar/tut_edit_height.png Binary files differnew file mode 100644 index 00000000..da4618f7 --- /dev/null +++ b/doc/kugar/tut_edit_height.png diff --git a/doc/kugar/tut_empty_report.png b/doc/kugar/tut_empty_report.png Binary files differnew file mode 100644 index 00000000..7effe6dd --- /dev/null +++ b/doc/kugar/tut_empty_report.png diff --git a/doc/kugar/tut_file_new.png b/doc/kugar/tut_file_new.png Binary files differnew file mode 100644 index 00000000..a06492e3 --- /dev/null +++ b/doc/kugar/tut_file_new.png diff --git a/doc/kugar/tut_rep_complete.png b/doc/kugar/tut_rep_complete.png Binary files differnew file mode 100644 index 00000000..1ac79a22 --- /dev/null +++ b/doc/kugar/tut_rep_complete.png diff --git a/doc/kugar/tut_rep_generated.png b/doc/kugar/tut_rep_generated.png Binary files differnew file mode 100644 index 00000000..7b8be549 --- /dev/null +++ b/doc/kugar/tut_rep_generated.png diff --git a/doc/kugar/tut_rep_look1.png b/doc/kugar/tut_rep_look1.png Binary files differnew file mode 100644 index 00000000..1fad4189 --- /dev/null +++ b/doc/kugar/tut_rep_look1.png diff --git a/doc/kugar/tut_rep_look2.png b/doc/kugar/tut_rep_look2.png Binary files differnew file mode 100644 index 00000000..e01a61fb --- /dev/null +++ b/doc/kugar/tut_rep_look2.png diff --git a/doc/kugar/tut_set_level.png b/doc/kugar/tut_set_level.png Binary files differnew file mode 100644 index 00000000..9a364a24 --- /dev/null +++ b/doc/kugar/tut_set_level.png diff --git a/doc/kugar/tutorial.docbook b/doc/kugar/tutorial.docbook new file mode 100644 index 00000000..67cd0f42 --- /dev/null +++ b/doc/kugar/tutorial.docbook @@ -0,0 +1,313 @@ +<!-- If you want to validate or edit this document separately, uncomment +this prolog + +<?xml version="1.0" ?> +<!DOCTYPE chapter PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd"> + +--> +<chapter id="tutorial"> +<chapterinfo> +<authorgroup> +<author> +<firstname>Alexander</firstname> +<surname>Dymo</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<author> +<firstname>Phil</firstname> +<surname>Thompson</surname> +<affiliation> +<address><email>[email protected]</email></address> +</affiliation> +</author> +<!-- TRANS:ROLES_OF_TRANSLATORS --> +</authorgroup> +</chapterinfo> +<title>Tutorial</title> + +<para>This tutorial attempts to be a brief introduction to Kugar.</para> + +<para>You will create a sample report template with &kudesigner;, +a sample data file and finally generate a complete report.</para> + +<para>The source code for sample templates and data files can be found +in <filename>sample1.ktf</filename> and <filename>sample1.kdf</filename> +that are distributed with &kugar;.</para> + + +<sect1 id="tut-1"> +<title>Creating the report template with &kudesigner;</title> + +<para> +Run Kugar Designer by typing <command>kudesigner</command> in the shell. +</para> + +<para> +After you start the designer, choose <guimenu>File</guimenu>|<guilabel>New</guilabel> +and set the page size to <guilabel>Letter</guilabel> and paper orientation to +<guilabel>Landscape</guilabel>. Set the left and right margins to 48, top +and bottom margins to 40. All dimensions in &kudesigner; (page +margins, sizes, positions, &etc;) are measured in millimeters. +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="tut_file_new.png" format="PNG"/> +</imageobject> +<textobject> +<phrase><interface>New Report</interface> dialog</phrase> +</textobject> +</mediaobject> +</screenshot> +</para> + +<para> +A new report is now created and all buttons on the <guilabel>Items Toolbar</guilabel> +and <guilabel>Sections Toolbar</guilabel> are now enabled (the corresponding +menu items from <guilabel>Items</guilabel> and <guilabel>Sections</guilabel> are also enabled). +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="tut_empty_report.png" format="PNG"/> +</imageobject> +<textobject> +<phrase>Empty Report window</phrase> +</textobject> +</mediaobject> +</screenshot> +</para> + +<para>Now it is the time to add some sections to the report and determine +their sizes. We will add <link linkend="report-header-and-footer">report header and footer</link>, +<link linkend="page-header-and-footer">page header and footer</link> and a single +<link linkend="detail">detail</link> section. Report headers and footers are printed on the +first page and on the last page of the report before and after any other report data accordingly. +Report footers are good places for <link linkend="calculated-field-element">calculated fields</link>. +Page headers and footers are printed at the top and bottom of each page. +Our report will have one detail section with level 0. This means that all our data rows +have identical structure (&ie; fields). If the data structure is more complex or it is +organized according to a master-detail relationship, more detail levels should be created. +See <filename>sample3.ktf</filename> and <filename>sample3.kdf</filename> for an example +of how that can be done. +Refer to the <link linkend="template-elements">template elements descriptions</link> +for additional information. +</para> + +<para>Sections are added by using <guilabel>Sections</guilabel> menu +or a <guilabel>Sections Toolbar</guilabel>. Now add a report header and footer, +a page header and footer and then a detail section. +When adding a detail section, set +its level to 0 as shown on the screenshot below. +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="tut_set_level.png" format="PNG"/> +</imageobject> +<textobject> +<phrase>Setting the detail level</phrase> +</textobject> +</mediaobject> +</screenshot> +</para> + +<para> +Our report should now look like this one in the screenshot. +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="tut_rep_look1.png" format="PNG"/> +</imageobject> +<textobject> +<phrase>Report with sections</phrase> +</textobject> +</mediaobject> +</screenshot> +</para> + +<para> +All our sections have a predefined height - 50mm. Let's change it. +To do this &RMB; click on the Report Header section or click the <guilabel>Edit Properties</guilabel> +button on the <guilabel>Edit Toolbar</guilabel> and then choose a section. +The Properties window should be shown. +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="tut_edit_height.png" format="PNG"/> +</imageobject> +<textobject> +<phrase>Height of the section editing</phrase> +</textobject> +</mediaobject> +</screenshot> +</para> + +<para> +Now set the Report Header's height to 70. Let's perform that procedure +for all other sections. Set the Page Header's height to 45 and the Detail's to 30. +The Page and Report Footers should be 32 mm in height. +</para> + +<para> +A report template with properly sized sections is ready to be filled with +report items. +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="tut_rep_look2.png" format="PNG"/> +</imageobject> +<textobject> +<phrase>Report with sized sections</phrase> +</textobject> +</mediaobject> +</screenshot> +</para> + +<para> +You can now add items to the sections on the report. Five different types of +items can be added to the report. <link linkend="label-element">Label</link> +is a rectangular area that can have borders and can be filled by +any kind of textual data. The Label's foreground and background colors, +as well as fonts, can be changed. Border line types and line colors are also +customizable. <link linkend="field-element">Fields</link> can be placed +on to a detail section. Fields represent data fields; their values +will be collected from a data file while generating a report. +Counts, sums, averages, &etc; for field values can be printed on the report +by means of <link linkend="calculated-field-element">Calculated Fields</link>. +<link linkend="special-element">Specials</link> are labels with predefined text, +such as current date or page number. The general report appearance can be refined +with <link linkend="line-element">Lines</link>. +</para> + +<para> +To add a report item click the corresponding item button on the <guilabel>Items Toolbar</guilabel> +and place (click) it on the section. The chosen item will be placed on the selected section +with the upper left corner at the given coordinates. Other properties are set to default +values and can be changed with the <guilabel>Report Item Options</guilabel> dialog (the same way +we used to change the section's height). +</para> + +<para> +So, let's add labels to the report header and page header as shown on the screenshot below. +Note that the <quote>Mutiny Bay Software</quote> label has its <guilabel>BorderStyle</guilabel> +and <guilabel>BorderWidth</guilabel> set to 0 and <quote>Software Inventory Report</quote> - 1mm. +Any colors are set as a combination of three values (RGB - red,green,blue) separated by commas. +</para> + +<para> +We will also add field elements to the detail section. Just assume we have four fields +- title, version, platform and copies. So, four <guilabel>Field</guilabel> elements should be placed and +their <guilabel>Field</guilabel> properties set. Note that <guilabel>Text</guilabel> +property is automatically set to <quote>[<userinput>field_name</userinput>]</quote>. +</para> + +<para> +Our page footer is a good place to show the current date and page number, so add two +special fields and set their <guilabel>Type</guilabel> properties to 0 and 1. +A special with Type=0 will represent date and one with Type=1 - page number. Note that +special's <guilabel>Text</guilabel> property is changed automatically. +</para> + +<para> +The last element to be placed is a <guilabel>Calculated Field</guilabel> for the <quote>copies</quote> +field. To acquire a sum (copies) set the calculated field's <guilabel>Field</guilabel> property +to <quote>copies</quote> and <guilabel>CalculationType</guilabel> to 1 (sum function). +</para> + +<para> +Finally, our report template should look like this: +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="tut_rep_complete.png" format="PNG"/> +</imageobject> +<textobject> +<phrase>Complete report</phrase> +</textobject> +</mediaobject> +</screenshot> +</para> + +</sect1> + + + +<sect1 id="tut-2"> +<title>Creating the report data file</title> + +<para> +Generally speaking, data files may be created in several ways. Some will use xsl transformation tables +to generate proper &XML; from another &XML; document (like a &kspread; spreadsheet); others will use +their own program to fetch data from a database and fill the data file. In this tutorial we will +simply create it by hand. The source code for the example can be found in file <filename>sample1.kdf</filename> +or copied from the example below. +</para> + +<programlisting> +<?xml version=<quote>1.0</quote> encoding=<quote>UTF-8</quote>?> + +<!DOCTYPE KugarData [ + <!ELEMENT KugarData (Row* )> + <!ATTLIST KugarData + Template CDATA #REQUIRED> + + <!ELEMENT Row EMPTY> + <!ATTLIST Row + level CDATA #REQUIRED + title CDATA #REQUIRED + version CDATA #REQUIRED + platform CDATA #REQUIRED + copies CDATA #REQUIRED> +]> + +<KugarData Template="sample1.ktf"> + <Row level="0" title=" BRU" version="15.0" platform="x86" copies="1"/> + <Row level="0" title=" Caldera Open Linux" version="2.2" platform="x86" copies="3"/> + <Row level="0" title=" K Desktop" version="1.1.1" platform="x86" copies="1"/> + <Row level="0" title=" Netscape Communicator" version="4.6" platform="x86" copies="10"/> + <Row level="0" title=" Redhat Linux" version="5.0" platform="x86" copies="11"/> + <Row level="0" title=" Redhat Linux" version="5.1" platform="x86" copies="12"/> + <Row level="0" title=" Redhat Linux" version="5.2" platform="x86" copies="14"/> + <Row level="0" title=" Redhat Linux" version="6.0" platform="x86" copies="15"/> + <Row level="0" title=" Star Office" version="5.0" platform="x86" copies="1"/> + <Row level="0" title=" Star Office" version="5.1" platform="x86" copies="3"/> + <Row level="0" title=" Microsoft Windows NT" version="3.1" platform="x86" copies="1"/> + <Row level="0" title=" Microsoft Windows NT" version="3.51" platform="x86" copies="1"/> + <Row level="0" title=" Microsoft Windows NT" version="4.0" platform="x86" copies="1"/> + <Row level="0" title=" Microsoft Windows NT" version="5.0" platform="x86" copies="1"/> + <Row level="0" title=" Sun Solaris" version="2.5" platform="Sparc" copies="1"/> +</KugarData> +</programlisting> + +</sect1> + +<sect1 id="tut-3"> +<title>Generating the report</title> + +<para> +At this moment we have a report template (<filename>sample1.ktf</filename>) and +a report data file (<filename>sample1.kdf</filename>). +</para> +<para> +To generate a report, type the following command in the shell: +<command>kugar <option>-r <replaceable>sample1.ktf</replaceable></option> +<option>-d <replaceable>sample1.kdf</replaceable></option></command> +</para> + +<para> +This will bring up a &kugar; shell window with the report generated. +<screenshot> +<mediaobject> +<imageobject> +<imagedata fileref="tut_rep_generated.png" format="PNG"/> +</imageobject> +<textobject> +<phrase>Generated report</phrase> +</textobject> +</mediaobject> +</screenshot> +</para> + +</sect1> + +</chapter> |