Précédent   Forum des professionnels en informatique > PHP > Bibliothèques et frameworks > Images > JpGraph
JpGraph Forum d'entraide pour la bibliothèque JpGraph permettant de manipuler des images en PHP. Avant de poster -> tutoriels JpGraph
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 06/07/2011, 10h44   #1
Invité de passage
 
Inscription : mars 2011
Messages : 60
Détails du profil
Informations forums :
Inscription : mars 2011
Messages : 60
Points : 1
Points : 1
Par défaut JPGraphe:Probléme d'affichage de graphe et export pdf

Bonjour,
Je veux exporter mes données dans un fichier pdf.Mon probléme est que l'erreur suivante s'affiche toujours:500 | Internal Server Error | JpGraphExceptionL
Empty input data array specified for plot. Must have at least one data point.
.
Ma fonction pour l'affichage de pdf est la suivante:
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
public function executeExportPdf(sfWebRequest $request)
	{
		$url=sfConfig::get('sf_upload_dir');
		$this->executeGraphICSImage($request);
		$this->executeLineImage($request);
		$this->executeGraphEHSImage($request);
		$this->executeGraphIIEFImage($request);
		$this->executeGraphIPSSImage($request);
 
		require_once sfConfig::get('sf_lib_dir').'/fpdf/fpdf.php';
		$patient = $this->getUser()->getAttribute('patient');
 
 
		  $this->pdf=new FPDF();
		  $this->pdf->AddPage();
		  $this->pdf->SetFont('Arial','B',12);
		  $this->pdf->SetDrawColor(30, 136, 236);
		  $this->pdf->Cell(0,10,'IPP : '.utf8_decode($patient->getIpp()).'    Nom : '.utf8_decode($patient->getName()).'    Prenom : '.utf8_decode($patient->getFirstname()).'    Date de naissance : '.utf8_decode(date('d-m-Y', strtotime($patient->getDateOfBirth()))),1,1,'C');
		  $this->pdf->Cell(80,2,'',0,1);
		  $this->pdf->Cell(40,8,'Biopsie',1,1);
		  foreach ($patient->getBiopsies() as $biopsie)
		  {
		    $biopsie_total_droite = $biopsie->getBaseD() + $biopsie->getMoyenD() + $biopsie->getApexD();
		    $biopsie_total_gauche = $biopsie->getBaseG() + $biopsie->getMoyenG() + $biopsie->getApexG();
 
		    $this->pdf->SetFont('Arial','B',11);
		    $this->pdf->Cell(50,6,date('d-m-Y', strtotime($biopsie->getDate())),0,1);
		    $this->pdf->SetFont('Arial','',10);
		    $this->pdf->Cell(60,5,'Score de gleason : '.$biopsie->getScoreGlobal(),0);
		    $this->pdf->Cell(60,5,'Grade de gleason : '.$biopsie->getScorePremier(),0,1);
		    $this->pdf->Cell(60,5,'% de biopsies positives : '.$biopsie->getRapportBP(),0);
		    $this->pdf->Cell(60,5,'% de longueur de biopsies positives : '.$biopsie->getRapportLT(),0,1);
		    $this->pdf->Cell(60,5,'Nombre de biopsies positives : '.$biopsie->getBiopsiePositive().' dont '.$biopsie_total_droite.' a droite et '.$biopsie_total_gauche.' a gauche',0,1);
 
		  }
		  $this->pdf->SetFont('Arial','B',12);
		  $this->pdf->Cell(80,5,'',0,1);
		  $this->pdf->Cell(40,8,'Pre-op',1,1);
		  foreach ($patient->getProstateRecaps() as $preop)
		  {
		    $this->pdf->SetFont('Arial','B',11);
		    $this->pdf->Cell(25,6,date('d-m-Y', strtotime($preop->getDate())),0);
		    $this->pdf->SetFont('Arial','',10);
		    $this->pdf->Cell(25,5,'PSA : '.$preop->getPsa(),0);
		    $this->pdf->Cell(25,5,'Stade T : '.$preop->getStadeT(),0);
		    $this->pdf->Cell(25,5,'Stade N : '.$preop->getStadeN(),0);
		    $this->pdf->Cell(25,5,'Stade M : '.$preop->getStadeM(),0);
		    if ($preop->getClassificationAmico() == 0)
		    {
		      $this->pdf->Cell(30,5,'Amico : Faible risque',0);
		    }
		    elseif ($preop->getClassificationAmico() == 1)
		    {
		      $this->pdf->Cell(30,5,'Amico : Risque intermediaire',0);
		    }
		    elseif ($preop->getClassificationAmico() == 2)
		    {
		      $this->pdf->Cell(30,5,'Amico : Haut risque',0);
		    }
		  }
		  $this->pdf->SetFont('Arial','B',12);
		  $this->pdf->Cell(0,10,'',0,1);
		  $this->pdf->Cell(40,8,'Traitements',1,1);
		  foreach ($patient->getTraitementFiches() as $traitement)
		  {
		    $this->pdf->SetFont('Arial','B',11);
		    $this->pdf->Cell(25,6,date('d-m-Y', strtotime($traitement->getDate())),0);
		    $this->pdf->SetFont('Arial','',10);
		    $this->pdf->Cell(25,5,utf8_decode($traitement->getTraitement()),0,1);
		  }
 
		  $this->pdf->SetFont('Arial','B',12);
		  //$pdf->Cell(0,6,'',0,1);
		  $this->pdf->Cell(0,5,'',0,1);
		  $this->pdf->Cell(40,8,'Anapath',1,1);
		  foreach ($patient->getAnapaths() as $anapath)
		  {
		    $this->pdf->SetFont('Arial','B',11);
		    $this->pdf->Cell(25,6,date('d-m-Y', strtotime($anapath->getDate())),0);
		    $this->pdf->SetFont('Arial','',10);
		    $this->pdf->Cell(30,5,'Stade pT : '.$anapath->getStadepT(),0);
                    $this->pdf->Cell(30,5,'Stade pN : '.$anapath->getStadepN(),0);
		    $this->pdf->Cell(40,5,'Score Gleason : '.$anapath->getGleason(),0);
		    $this->pdf->Cell(40,5,'Grade Gleason : '.$anapath->getGleasonMax(),0,1);
		  }
 
		  $this->pdf->SetFont('Arial','B',12);
		  //$pdf->Cell(0,6,'',0,1);
		  $this->pdf->Cell(0,5,'',0,1);
		  $this->pdf->Cell(40,8,'Suivi',1,1);
		  foreach ($patient->getSuivis() as $suivi)
		  {
		    $this->pdf->SetFont('Arial','B',11);
		    $this->pdf->Cell(25,6,date('d-m-Y', strtotime($suivi->getDate())),0);
		    $this->pdf->SetFont('Arial','',10);
		    if ($suivi->getRecidive() == 0)
		    {
		      $this->pdf->Cell(50,5,utf8_decode('1ere récidive'),0,1);
		    }
		    if ($suivi->getRemission() == 0)
		    {
		      $this->pdf->Cell(50,5,utf8_decode('Rémission sans TTT'),0,1);
		    }
		    elseif ($suivi->getRemission() == 1)
		    {
		      $this->pdf->Cell(50,5,utf8_decode('Rémission avec TTT complémentaire'),0,1);
		    }
		    elseif ($suivi->getRemission() == 2)
		    {
		      $this->pdf->Cell(50,5,utf8_decode('Aucune rémission'),0,1);
		    }
		    elseif ($suivi->getRemission() == 3)
		    {
		      $this->pdf->Cell(50,5,utf8_decode('Rémission douteuse'),0,1);
		    }
		    if ($suivi->getTraitementComps()->count() > 0)
		    {
		      $this->pdf->Cell(50,5,utf8_decode('Traitements complémentaires : '),0);
 
		      foreach ($suivi->getTraitementComps() as $test)
		      {
		        $this->pdf->Cell(30,5,utf8_decode($test),0);
		      }
 
		    }
		    $this->pdf->Cell(0,6,'',0,1);
		    if ($suivi->getMetastase() == 0)
		    {
		      $this->pdf->Cell(50,6,'Metastases : '.date('d-m-Y', strtotime($suivi->getDateMeta())),0,1);
		      $this->pdf->Cell(20,5,'Type : ',0);
		    if ($suivi->getOs() == 1)
		    {
		      $this->pdf->Cell(20,5,'OS',0);
		    }
		    if ($suivi->getGamma() == 1)
		    {
		      $this->pdf->Cell(20,5,'Gamma',0);
		    }
		    if ($suivi->getAutre() == 1)
		    {
		      $this->pdf->Cell(20,5,$suivi->getAutreComm(),0);
		    }
 
		    }
		    $this->pdf->Cell(0,6,'',0,1);
		  }
		  $this->pdf->SetFont('Arial','B',12);
		  $this->pdf->Cell(0,6,'',0,1);
		  $this->pdf->Cell(0,5,'',0,1);
 
		  if($patient->getDateOfDeath() <> NULL )
		  {
		    $this->pdf->Cell(40,8,utf8_decode('Décès'),1,1);
		    $this->pdf->Cell(60,6,utf8_decode('Patient décédé le '.date('d-m-Y', strtotime($patient->getDateOfDeath()))),0);
		    if($patient->getCauseOfDeath() == 0 )
		    {
		      $this->pdf->Cell(20,5,utf8_decode(', le décès est lié à la pathologie'),0);
		    }
		  }
 
                $this->pdf->AddPage();
                $this->pdf->SetFont('Arial','B',12);//définition de la police
                $this->pdf->Cell(0,5,'',0,1);
		$this->pdf->Cell(40,8,'Graphiques',1,1);
                $this->pdf->Image($url.'/Graph/PSA.png',10,40,50,50);
		$this->pdf->Image($url.'/Graph/ICS.png',60,40,50,50);
		$this->pdf->Image($url.'/Graph/EHS.png',10,110,50,50);
		$this->pdf->Image($url.'/Graph/IIEF.png',60,110,50,50);
		$this->pdf->Image($url.'/Graph/IPSS.png',10,170,50,50);
		$this->pdf->Ln(50);//Saut de ligne
 
		$this->pdf->Output();
                $this->setTemplate('pdf');
Pourriez vous m'aider pour afficher les données dans un fichier pdf?
farhaenis est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 03h22.


 
 
 
 
Partenaires

Hébergement Web