iam using the following script to print the report in pdf ...
<?php
include '../../db.php';
$Sname = $_SESSION['insid'];
require('mysql_report.php');
$pdf = new PDF('P','pt','A4');
$pdf->SetFont('Arial','',10.5);
$pdf->connect('localhost','root','admin','iiews');
$attr = array('titleFontSize'=>12, 'titleText'=>'Complete Course Students Report');
$sql="select *from studentregdtb where InstituteId='$Sname' and Approval='C'";
// echo $sql;
$rss=mysql_query($sql) or die (mysql_error());
$count = mysql_num_rows($rss);
while( $b=mysql_fetch_array($rss))
{
$sql="select RegdId,Name,FatherName,MotherName,(select DistrictName from Distt where Did='$b[District]') as District , (select BlockName from Block where BlockId='$b[Block]') as Block,Sex,Category,AddmissionDate from studentregdtb where Approval='C'";
//echo $sql;
$pdf->mysql_report($sql,false,$attr);
$pdf->Output();
}
?>
this script working fine but its print only last value.which is having District and Block
how do i print report in pdf format .................
Moderator: General Moderators
-
manojsemwal1
- Forum Contributor
- Posts: 217
- Joined: Mon Jun 29, 2009 4:13 am
- Location: India
how do i print report in pdf format .................
- Attachments
-
- screen.JPG (55.07 KiB) Viewed 530 times
Re: how do i print report in pdf format .................
What does your query return when the data is dumped out raw?
-
manojsemwal1
- Forum Contributor
- Posts: 217
- Joined: Mon Jun 29, 2009 4:13 am
- Location: India
Re: how do i print report in pdf format .................
in the jpg image the result is displaying but in that column Block chakrata is displyaing two time while it is diffrent block.