Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

rapport Class Reference

Class rapport Create, view, modify and parse report. More...


Public Member Functions

 rapport ($p_cn, $p_id)
 Constructor.
 GetName ()
 Return the report's name.
 GetRow ($p_start, $p_end)
 return all the row and parse formula from a report

Data Fields

 $db
 $id
 $name


Detailed Description

Class rapport Create, view, modify and parse report.

Definition at line 28 of file class_rapport.php.


Constructor & Destructor Documentation

rapport::rapport p_cn,
p_id
 

Constructor.

Definition at line 33 of file class_rapport.php.

References $p_id, and name.

00033                                 {
00034     $this->db=$p_cn;
00035     $this->id=$p_id;
00036     $this->name='UNDEF';
00037   }


Member Function Documentation

rapport::GetName  ) 
 

Return the report's name.

Definition at line 40 of file class_rapport.php.

References $a, $ret, and name.

00040                      {
00041     $ret=execSql($this->db,"select fr_label from formdef where fr_id=".$this->id);
00042     if (pg_NumRows($ret) == 0) return $this->name;
00043     $a=pg_fetch_array($ret,0);
00044     $this->name=$a['fr_label'];
00045     return $this->name;
00046   }

rapport::GetRow p_start,
p_end
 

return all the row and parse formula from a report

Parameters:
$p_start start periode
$p_end end periode

Definition at line 53 of file class_rapport.php.

References $col, $l_line, $Max, $Res, ExecSql(), and ParseFormula().

00053                                     {
00054 
00055    $Res=ExecSql($this->db,"select fo_id ,
00056                      fo_fr_id,
00057                      fo_pos,
00058                      fo_label,
00059                      fo_formula,
00060                      fr_label from form
00061                       inner join formdef on fr_id=fo_fr_id
00062                      where fr_id =".$this->id.
00063                      "order by fo_pos");
00064     $Max=pg_NumRows($Res);
00065     if ($Max==0) {      $this->row=0;return null;}
00066     $col=array();
00067     for ($i=0;$i<$Max;$i++) {
00068       $l_line=pg_fetch_array($Res,$i);
00069         $col[]=ParseFormula($this->db,
00070                             $l_line['fo_label'],
00071                             $l_line['fo_formula'],
00072                             $p_start,
00073                             $p_end
00074                             );
00075      
00076     } //for ($i
00077     $this->row=$col;
00078     return $col;
00079   }


Field Documentation

rapport::$db
 

database connx

Definition at line 29 of file class_rapport.php.

rapport::$id
 

formdef.fr_id

Definition at line 30 of file class_rapport.php.

rapport::$name
 

report's name

Definition at line 31 of file class_rapport.php.


The documentation for this class was generated from the following file: