I have finally able to resolve it after so much testing.
Code: Select all
function sti_get_report($report_key)
{
switch ($report_key)
{
case "Report": return file_get_contents("reports/Report.mrt");
//case "report2": return file_get_contents("/reports/Document.mdc");
}
if (file_exists("reports/$report_key")) return file_get_contents("reports/$report_key");
// If there is no need to load the report, then the empty string will be sent
return "";
// If you want to display an error message, please use the following format
return "ServerError:Some text message";
}
Smile
Chankl78