What about colors?

Alllll right, lets put some colors in it. The best way to do that is using CSS files to tell what is the element layout. If you don't know what a CSS file is, search on the internet, its easy, its a way of define classes to use in your HTML layout, just to resume.
PHPReports allow you to use two attributes to inform the CSS classes you want in your report: TEXTCLASS, defines the element text layout, and CELLCLASS, defines the table (all the page is a HTML table, did you noticed that?) cell layout.
To use CSS, first, we need to create a CSS file with all the classes we want, and create an element to put the CSS file path. Then we use the TEXTCLASS and CELLCLASS on all the elements we need (sometimes there's no need of the TEXTCLASS - you can define all the stuff you need on the CELLCLASS). Let's take a look on the sales3.xml file (notice the second line, I'm using now the DTD instruction) :
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE REPORT SYSTEM "PHPReport.dtd">
<REPORT>
   <TITLE>Sales Report</TITLE>
   <BACKGROUND_COLOR>#FFFFFF</BACKGROUND_COLOR>
   <CSS>phpreports.css</CSS>
   <PAGE BORDER="1" SIZE="25" CELLSPACING="0" CELLPADDING="5" WIDTH="500">
      <HEADER>
         <ROW>
            <COL COLSPAN="5" CELLCLASS="PAGE_LAYER" TEXTCLASS="BOLD">John Doe Enterprises</COL>
         </ROW>
         <ROW>
            <COL COLSPAN="5" CELLCLASS="PAGE_LAYER" TEXTCLASS="BOLD">Sales Report</COL>
         </ROW>
      </HEADER>		
      <FOOTER>
         <ROW>
            <COL ALIGN="RIGHT" COLSPAN="4" CELLCLASS="PAGE_LAYER">page total</COL>
            <COL ALIGN="LEFT" NUMBERFORMATEX="2" CELLCLASS="PAGE_LAYER" TEXTCLASS="BOLD" TYPE="EXPRESSION">$this->getSum("value")</COL>
         </ROW>
      </FOOTER>		
   </PAGE>
   <GROUPS>
      <GROUP NAME="maingroup">
         <FIELDS>
            <ROW>
               <COL TYPE="FIELD" CELLCLASS="GROUP_LAYER">id</COL>
               <COL TYPE="FIELD" CELLCLASS="GROUP_LAYER">name</COL>
               <COL TYPE="FIELD" CELLCLASS="GROUP_LAYER">city</COL>
               <COL TYPE="FIELD" CELLCLASS="GROUP_LAYER">product</COL>
               <COL TYPE="FIELD" CELLCLASS="GROUP_LAYER">value</COL>
            </ROW>
         </FIELDS>
      </GROUP>
   </GROUPS>
</REPORT>
Here we can talk about a new feature on the 0.0.9 version: the PHPReportPreview.php file, where you can have a preview of how your report will looks like *before* run it with the data. It can save you some time, sometimes your query can be time and resource expensive, so you can make some changes and corrections before.
To use it you need to point your web browser where the PHPReportPreview.php file is located and use a parameter called xml with the full path of your XML report layout file, like this:
http://localhost/phpreports/PHPReportPreview.php?xml=sales3.xml
You *must* run the PHPReportPreview.php on the same dir where the PHPReportPreview.xsl is located, but it can be easily changed on the PHPReportPreview.php file. Its really easy!

The preview will look like this:

sales3.xml preview file

The report with the data will look like this:

sales.xml result file

Now you ask me "and if I want to make even and odd rows look different? it could help me to visualize a lot of data!" ... ok, there's two parameters to deal with that. Use CELLCLASSEVEN and CELLCLASSODD like sales3b.xml (but its important that you need to use both parameters and when using it you can't use the regular CELLCLASS parameter):
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE REPORT SYSTEM "PHPReport.dtd">
<REPORT>
   <TITLE>Sales Report</TITLE>
   <BACKGROUND_COLOR>#FFFFFF</BACKGROUND_COLOR>
   <CSS>phpreports.css</CSS>
   <PAGE BORDER="1" SIZE="25" CELLSPACING="0" CELLPADDING="5" WIDTH="500">
      <HEADER>
         <ROW>
            <COL COLSPAN="5" CELLCLASS="PAGE_LAYER" TEXTCLASS="BOLD">John Doe Enterprises</COL>
         </ROW>
         <ROW>
            <COL COLSPAN="5" CELLCLASS="PAGE_LAYER" TEXTCLASS="BOLD">Sales Report</COL>
         </ROW>
      </HEADER>		
      <FOOTER>
         <ROW>
            <COL ALIGN="RIGHT" COLSPAN="4" CELLCLASS="PAGE_LAYER">page total</COL>
            <COL ALIGN="LEFT" NUMBERFORMATEX="2" CELLCLASS="PAGE_LAYER" TEXTCLASS="BOLD" TYPE="EXPRESSION">$this->getSum("value")</COL>
         </ROW>
      </FOOTER>		
   </PAGE>
   <GROUPS>
      <GROUP NAME="maingroup">
         <FIELDS>
            <ROW>
               <COL TYPE="FIELD" CELLCLASSEVEN="GROUP_LAYER" CELLCLASSODD="YELLOW_ROW">id</COL>
               <COL TYPE="FIELD" CELLCLASSEVEN="GROUP_LAYER" CELLCLASSODD="YELLOW_ROW">name</COL>
               <COL TYPE="FIELD" CELLCLASSEVEN="GROUP_LAYER" CELLCLASSODD="YELLOW_ROW">city</COL>
               <COL TYPE="FIELD" CELLCLASSEVEN="GROUP_LAYER" CELLCLASSODD="YELLOW_ROW">product</COL>
               <COL TYPE="FIELD" CELLCLASSEVEN="GROUP_LAYER" CELLCLASSODD="YELLOW_ROW">value</COL>
            </ROW>
         </FIELDS>
      </GROUP>
   </GROUPS>
</REPORT>
And we get:

sales.xml result file

And let there be colors!!! :-)