Notice: Undefined variable: valor in C:\wamp\www\Meganet\Reportes\ventas\generar_report e.php on line 13
Fatal error: Cannot access empty property in C:\wamp\www\Meganet\Reportes\ventas\generar_report e.php on line 13
adjunto el codigo y agradezco de antemano cualquier solucion que permita saltar este problema.
 Código PHP:
   <?php 
    require("../../Clases/FPDF/fpdf.php");
    require("../../Clases/OCBD_mysql_class.php");
    
    
    class PDF extends FPDF{
    
        var $obj_conector;
        var $valor;
        
        function PDF(){
            parent::FPDF();
            $this->$valor="";
            $this->$obj_conector=new OCBD_mysql("meganet");
            $this->$obj_conector->conectar();
        }
        function Header(){
            //Logo
            $this->Image("logo.jpg",13,10,33);
            //Feunte Arial Bold 15
            $this->SetFont("Arial","B",15);
            //Moverse a la derecha
            $this->Cell(41);
            //Titulo
            if($this->$valor==""){
                $this->Cell(160,10," Reporte: Ventas registradas en el sistema","LTR",0,"C");
            }
            else{
                $sql="SELECT nomcli_cli,apecli_cli FROM clientes WHERE idecli_cli =\"$valor\"";
                $resultado=$this->$obj_conector->query_exe($sql);
                $fila=mysql_fetch_array($resultado);
                $this->Cell(160,10,"Reporte: Ventas realizadas a: ".$fila["nomcli_cli"]." ".$fila["apecli_cli"],"LRT",0,"C");
            }
            $this->Ln();
            $this->Cell(41);
            $this->SetFont("Arial","B",10);
            $this->Cell(160,10,"Fecha:".date("d-m-Y")." Hora:".date("H:i:s"),"LRB",0,"C");
            //Salto de linea
            $this->Ln(20);
        }
        
        function Tabla()
        {
            //Colores, ancho de línea y fuente en negrita
            $this->SetFillColor(255,0,0);
            $this->SetTextColor(255);
            $this->SetFont('','B');
            //Cabecera
            $this->Cell(200,9,"Datos Factura",1,1,"C",1);
            
            $this->SetFillColor(255);
            $this->SetTextColor(0,0,255);
            $this->SetFont('','');
            
            $this->Cell(30,8,"Nº Factura",1,0,"L",1);
            $this->Cell(70,8,"",1,0,"L",0);
            $this->Cell(30,8,"Fecha",1,0,"L",1);
            $this->Cell(70,8,"",1,0,"L",0);
            $this->Ln();
            
            $this->SetFillColor(255,0,0);
            $this->SetTextColor(255);
            $this->SetFont('','B');
            
            $this->Cell(200,9,"Datos Cliente",1,1,"C",1);
            
            $this->SetFillColor(255);
            $this->SetTextColor(0,0,255);
            $this->SetFont('','');
            
            $this->Cell(30,8,"Identificacion",1,0,"L",1);
            $this->Cell(70,8,"",1,0,"L",0);
            $this->Cell(30,8,"Telefono",1,0,"L",1);
            $this->Cell(70,8,"",1,0,"L",0);
            
            $this->Ln();
            
            $this->Cell(30,8,"Nombre",1,0,"L",1);
            $this->Cell(70,8,"",1,0,"L",0);
            $this->Cell(30,8,"Apellido",1,0,"L",1);
            $this->Cell(70,8,"",1,0,"L",0);
            
            $this->Ln();
            
            $this->SetFillColor(255,0,0);
            $this->SetTextColor(255);
            $this->SetFont('','B');
            $this->Cell(200,9,"Articulos",1,1,"C",1);
            
            $this->SetFont('','',10);
            $w=array(15,40,70,15,30,30);
            $encabezado=array("Codigo","Nombre","Descripcion","Cantidad","Valor Unitario","Valor Total");
            for($i=0;$i<count($encabezado);$i++)
                $this->Cell($w[$i],7,$encabezado[$i],1,0,'C',1);
            /*
            $this->Ln();
            //Restauración de colores y fuentes
            $this->SetFillColor(224,235,255);
            $this->SetTextColor(0);
            $this->SetFont('');
            //Datos
            $fill=false;
            while($fila=mysql_fetch_array($resultado_sql))
            {    
                for($i=0;$i<count($encabezado);$i++)
                    $this->Cell($w[$i],6,$fila[$i],"LR",0,"L",$fill);
                $this->Ln();
                $fill=!$fill;
            }
            $this->Cell(array_sum($w),0,'','T');
            */
        }
        
        function GeneraTablas($consulta_sql){
        
        }
        
        function Footer(){
            $this->AliasNbPages();
            //Posicion: 1,5 cm del final
            $this->SetY(-15);
            //Fuente Arial Italic 8
            $this->SetFont("Arial","I",8);
            //Numero de pagina
            $this->Cell(0,10,"Pagina ".$this->PageNo().'/{nb}',0,0,"C");
            $this->SetY(-25);
            $this->SetFont("Arial","IB",8);
            if($this->$valor==""){
                $sql="SELECT * FROM ventas";
                $total_ventas=0;
                $resultado=$this->$obj_conector->query_exe($sql);
                $this->Cell(0,4,"Numero total de ventas registradas: ".mysql_num_rows($resultado),"LRT",0,"C");
                while($fila=mysql_fetch_array($resultado)){
                    $total_ventas+=$fila["totalv_ven"];
                }
                $this->Ln();
                $this->Cell(0,4,"Valor total de ventas registradas: $".number_format($total_ventas,0,",","."),"LRB",0,"C");
                
            }
            else{
                $sql="SELECT * FROM ventas WHERE idecli_ven=\"$valor\"";
                $sql2="SELECT * FROM clientes WHERE idecli_cli=\"$valor\"";
                $resultado=$this->$obj_conector->query_exe($sql);
                $resultado2=$this->$obj_conector->query_exe($sql2);
                $fila=mysql_fetch_array($resultado2);
                $total_ventas=0;
                $this->Cell(0,4,"Numero total de ventas registradas a ".$fila["nomcli_cli"]." ".$fila["apecli_cli"].": ".mysql_num_rows($resultado),"LRT",0,"C");
                
                while($fila=mysql_fetch_array($resultado)){
                    $total_ventas+=$fila["totalv_ven"];
                }
                $sql2="SELECT * FROM clientes WHERE idecli_cli=\"$valor\"";
                $resultado2=$this->$obj_conector->query_exe($sql2);
                $fila=mysql_fetch_array($resultado2);;
                $this->Ln();
                $this->Cell(0,4,"Valor total de ventas registradas a ".$fila["nomcli_cli"]." ".$fila["apecli_cli"].": $".number_format($total_ventas,0,",","."),"LRB",0,"C");
            }
        }
    }
    
    $pdf=new PDF();
    $obj_conector=new OCBD_mysql("meganet");
    $valor=$_POST["valor_parametro"];
    $resultado="";
    $obj_conector->conectar();
    $pdf->AddPage("P","Legal");
    $pdf->SetFont("Times","",12);
    
    $pdf->Tabla();
    /*
    $encabezado=array("Identificacion","Apellido","Nombre","Direccion","Ciudad","Telefono","Correo","Fecha Registro");
    
    if($valor==""){
        $sql="SELECT idecli_cli,apecli_cli,nomcli_cli,dircli_cli,codciu_cli,telcli_cli,emacli_cli,feincl_cli FROM clientes ORDER BY feincl_cli";
        $resultado=$obj_conector->query_exe($sql);
    }
    else{
        $sql="SELECT idecli_cli,apecli_cli,nomcli_cli,dircli_cli,codciu_cli,telcli_cli,emacli_cli,feincl_cli FROM clientes WHERE codciu_cli =\"$valor\"";
        $resultado=$obj_conector->query_exe($sql);
    }
    
    $pdf->Tabla($encabezado,$resultado);
    */
    $pdf->Output();
?>    
 


