Location: PHPKode > projects > THINi Reports > THINiReports-0.1.1/test-Report.php
<?php
ini_set('memory_limit', '32M');

require_once 'Report.class.php';
$my_report = new Report();
$my_report->Less_Random_Data();
$my_report->Group_Data(array('County', 'Postcode'));
$my_report->Column_Widths = array('Town' => 150, 'ItemA' => 70, 'ItemB' => 70);
$html = $my_report->Column_Headers();
$html .= $my_report->Display_Group_Divs($my_report->Data_Grouped);

//header('Content-type: text/plain');
//echo $my_report->Assoc_2_XML($my_report->Data_Assoc);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
 <title>Grouped Reports</title>
 <!-- <link rel="stylesheet" href="default.css" type="text/css" /> -->
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <style>
 <!--
  body{
   font-family: "Lucida Grande", "Verdana", "Arial", sans-serif;
   font-size: 10px;
  }
  h1, h2, h3, h4, h5, h6{
   margin: 0 4px 0 4px;
  }
  div.group{
   margin: 0 4px 0 4px;
   /*border: 1px solid #000;*/
  }
  div.field{
   float: left;
   width: <?=floor(100 / $my_report->Grouped_Column_Count);?>%;
   overflow: hidden;
   /*border: 1px solid #000;*/
  }
  div.field_odd{
   float: left;
   width: <?=floor(100 / $my_report->Grouped_Column_Count);?>%;
   overflow: hidden;
   background-color: #eee;
   /*border: 1px solid #000;*/
  }
  div.field_even{
   float: left;
   width: <?=floor(100 / $my_report->Grouped_Column_Count);?>%;
   overflow: hidden;
   background-color: #fff;
   /*border: 1px solid #000;*/
  }
 -->
 </style>
</head>
<body>
<?=$html;?>
</body>
</html>
Return current item: THINi Reports