The problem probably lies in the 'full_report_exporting.php'script. So show the code of that script here. ANd do not forget to show that code within PHP or code tags!!!
Ronald :cool:
Hello Ronald,
full_report_exporting.php is working well coz the else part of the below given code is showing the output perfect.
<?php
ob_start();
session_register("SESSION");
require_once("Worksheet.php");
require_once("Workbook.php");
require("../include/smcconf.php");
require("../include/smclib.php");
$smc = new SMC;
$smc->connect("$SMCUSER@$SMCSERVER", "$SMCPASSWD") or die("Can not connect to database!");
function HeaderingExcel($filename)
{
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$filename" );
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");
}
if(isset($test_runid))
{
$test_run_name="";
$projectid=$SESSION["projectid"];
$test_runid=$_GET['$test_runid'];
$sql = "select test_run_name
from test_run
where test_runid = (".$test_runid.")";
$smc->query($sql) or die("<h4>Error in selecting feature<br><br>".$sql."</h4>");
$test_run_name= $smc->result;
$project_name=$SESSION["project_name"];
}
else
{
$projectid=$SESSION["projectid"];
$test_runid=$SESSION["test_runid"];
$project_name=$SESSION["project_name"];
$test_run_name=$SESSION["test_run_name"];
}
$filename = "full_report_".$project_name."_".$test_run_nam e;
$filename = str_replace('.', '_', $filename);
$filename = str_replace('/', '_', $filename);
HeaderingExcel($filename.".xls");
$workbook = new Spreadsheet_Excel_Writer_Workbook("-");
$worksheet1 =& $workbook->addWorksheet("Test List");
$worksheet1->setColumn(1, 35, 5);
$worksheet2 =& $workbook->addWorksheet("FAILED TESTS");
$worksheet2->setColumn(1, 25, 5);
$worksheet3 =& $workbook->addWorksheet("DDTS REPORT");
$worksheet3->setColumn(1, 25, 5);
$worksheet4 =& $workbook->addWorksheet("Test Tracking Chart");
$worksheet4->setColumn(0, 0, 25);
$worksheet4->setColumn(1, 100, 6);
$worksheet5 =& $workbook->addWorksheet("Test Statistics");
$worksheet5->setColumn(1, 25, 5);
?>
The whole code is very big stretching to 2000 lines.I think the above part of code is sufficient to find if a problem is existing coz i'm using the variable passed in shell_exec command only in the above part.
Thanks for acknowledging my mail.i will be grateful if you can guide me out through this.
Thanks&Regards,
Shara.