本文整理汇总了PHP中PDFReport类的典型用法代码示例。如果您正苦于以下问题:PHP PDFReport类的具体用法?PHP PDFReport怎么用?PHP PDFReport使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PDFReport类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Header
function Header()
{
global $cityName;
$this->SetFont('Arial', '', 12);
$this->SetX(-35);
$this->Cell(0, 6, date("M d, Y"), 0, 0, 'R');
$this->Ln(0);
$this->printTitle();
$this->SetFont('Arial', '', 12);
$t = "";
$v = "";
if (isset($_GET['region']) && strlen($_GET['region']) > 0) {
$t = "Region";
$v = $_GET['region'];
} else {
if (isset($_GET['city']) && strlen($_GET['city']) > 0) {
$t = "City";
$v = $_GET['city'];
}
}
if (strlen($t) > 0) {
$this->Cell(30, 6, $t, 0, 0, 'L');
$this->Cell(63, 6, $v, 'B', 0, 'L');
if (strlen($cityName) > 0) {
$this->Cell(30, 6, "City", 0, 0, 'L');
$this->Cell(63, 6, $cityName, 'B', 0, 'L');
}
$this->Ln(10);
}
//Ensure table header is output
parent::Header();
}
示例2: Header
function Header()
{
global $title, $partyName;
$this->SetFont('Arial', 'B', 18);
// $this->Cell(0, 6, $_SESSION['companyname'], 0, 0, 'C');
$this->SetFont('Arial', '', 12);
$this->SetX(-35);
$this->Cell(0, 6, date("M d, Y"), 0, 0, 'R');
$this->Ln(0);
$this->SetFont('Arial', 'B', 14);
$this->Cell(0, 6, $title, 0, 1, 'C');
$this->Ln(2);
if (strlen($_GET['date_start']) > 0) {
$this->SetFont('Arial', 'B', 12);
$this->Cell(30, 6, "Start Date:", 0, 0, 'L');
$this->SetFont('Arial', '', 12);
$this->Cell(30, 6, $_GET['date_start'], 'B', 0, 'L');
$this->SetX(-70);
}
if (strlen($_GET['date_end']) > 0) {
$this->SetFont('Arial', 'B', 12);
$this->Cell(30, 6, "End Date:", 0, 0, 'L');
$this->SetFont('Arial', '', 12);
$this->Cell(30, 6, $_GET['date_end'], 'B', 0, 'R');
}
$this->Ln();
$this->SetFont('Arial', 'B', 12);
$this->Cell(30, 6, "Party:", 0, 0, 'L');
$this->SetFont('Arial', '', 12);
$this->Cell(150, 6, $partyName, 'B', 1, 'L');
$this->Ln(2);
//Ensure table header is output
parent::Header();
}
示例3: COUNT
function __construct($orientation, $metric, $size, $startdate, $enddate, $userid)
{
$dynamicY = 0;
parent::__construct($orientation, $metric, $size);
$this->SetAutoPageBreak(true, 30);
$this->AddPage();
try {
$and = "";
if ($startdate != "") {
$and .= " AND A.matchdate >= '{$startdate}' ";
}
if ($enddate != "") {
$and .= " AND A.matchdate <= '{$enddate}' ";
}
if ($userid != "0") {
$and .= " AND A.refereeid = {$userid} ";
}
$sql = "SELECT COUNT(*) AS matches, SUM(refereescore) AS score, \n\t\t\t\t\t B.name AS refereeename\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}matchdetails A \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}referee B \n\t\t\t\t\t\tON B.id = A.refereeid \n\t\t\t\t\t\tWHERE refereescore >= 0 {$and}\n\t\t\t\t\t\tGROUP BY B.name \n\t\t\t\t\t\tORDER BY B.name";
$result = mysql_query($sql);
if ($result) {
while ($member = mysql_fetch_assoc($result)) {
$line = array("Referee" => $member['refereeename'], "Games" => $member['matches'], "Average Score" => number_format($member['score'] / $member['matches'], 1));
if ($this->GetY() > 265) {
$this->AddPage();
}
$this->addLine($this->GetY(), $line);
}
} else {
logError($sql . " - " . mysql_error());
}
} catch (Exception $e) {
logError($e->getMessage());
}
}
示例4: while
function __construct($orientation, $metric, $size, $startdate, $enddate)
{
$dynamicY = 0;
parent::__construct($orientation, $metric, $size);
$this->SetAutoPageBreak(true, 30);
$this->AddPage();
try {
$and = "";
if ($startdate != "") {
$and .= " AND A.matchdate >= '{$startdate}' ";
}
if ($enddate != "") {
$and .= " AND A.matchdate <= '{$enddate}' ";
}
$sql = "SELECT A.*, DATE_FORMAT(A.matchdate, '%d/%m/%Y') AS matchdate,\n\t\t\t\t\t B.name AS refereeename,\n\t\t\t\t\t C.age, C.name AS teamname\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}matchdetails A \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}referee B \n\t\t\t\t\t\tON B.id = A.refereeid \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}teamagegroup C \n\t\t\t\t\t\tON C.id = A.teamid \n\t\t\t\t\t\tWHERE (A.ratereferee = 'P' OR A.rateplayers = 'P' OR A.ratemanagement = 'P' OR A.ratespectators = 'P' OR A.ratepitchsize = 'P' OR A.ratepitchcondition = 'P' OR A.rategoalsize = 'P' OR A.ratechangingrooms = 'P') {$and}\n\t\t\t\t\t\tORDER BY A.matchdate";
$result = mysql_query($sql);
if ($result) {
while ($member = mysql_fetch_assoc($result)) {
$line = array("Date of Match" => $member['matchdate'], "Age Group" => "Under " . $member['age'], "Division" => $member['division'], "Reported By" => $member['teamname'], "Match ID" => $member['id'], "Comments" => $member['remarks']);
if ($this->GetY() > 175) {
$this->AddPage();
}
$this->addLine($this->GetY(), $line);
}
} else {
logError($sql . " - " . mysql_error());
}
} catch (Exception $e) {
logError($e->getMessage());
}
}
示例5: Header
function Header()
{
global $title;
$this->SetFont('Arial', '', 12);
$this->SetX(-35);
$this->Cell(0, 6, date("M d, Y"), 0, 0, 'R');
$this->Ln(0);
$this->SetFont('Arial', 'B', 14);
$this->Cell(0, 6, $title, 0, 1, 'C');
$this->Ln(2);
$this->SetFont('Arial', 'B', 10);
//$this->Cell(50, 6, $vendor, 'B', 0, 'L');
$this->SetX($this->GetX() + 90);
//$this->Cell(50, 6, $vehicle, 'B', 1, 'L');
$this->Ln(2);
$w = $this->w - $this->lMargin - $this->rMargin;
$this->SetFont('Arial', 'B', 10);
$this->Cell(20 / 100 * $w, 6, "Name", 1, 0, 'C');
$this->Cell(25 / 100 * $w, 6, "Address", 1, 0, 'C');
$this->Cell(10 / 100 * $w, 6, "Phone1", 1, 0, 'C');
$this->Cell(10 / 100 * $w, 6, "Phone2", 1, 0, 'C');
$this->Cell(10 / 100 * $w, 6, "Phone3", 1, 0, 'C');
$this->Cell(12 / 100 * $w, 6, "Person", 1, 0, 'C');
$this->Cell(13 / 100 * $w, 6, "Vehicle", 1, 0, 'C');
$this->Ln();
//Ensure table header is output
parent::Header();
}
示例6: SUM
function __construct($orientation, $metric, $size, $year, $month)
{
$dynamicY = 0;
parent::__construct($orientation, $metric, $size);
$this->SetAutoPageBreak(true, 30);
$this->AddPage();
try {
$sql = "SELECT SUM(TIMESTAMPDIFF(MINUTE, starttime, endtime)) AS hours, B.name AS customername\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}diary A \n\t\t\t\t\t\tINNER JOIN {$_SESSION['DB_PREFIX']}client B \n\t\t\t\t\t\tON B.id = A.clientid \n\t\t\t\t\t\tWHERE A.status IN ('I', 'C')\n\t\t\t\t\t\tAND YEAR(A.starttime) = {$year}\n\t\t\t\t\t\tAND MONTH(A.starttime) = {$month}\n\t\t\t\t\t\tAND A.deleted != 'Y'\n\t\t\t\t\t\tGROUP BY B.name\n\t\t\t\t\t\tORDER BY B.name";
$result = mysql_query($sql);
if ($result) {
while ($member = mysql_fetch_assoc($result)) {
$line = array("Customer" => $member['customername'], "Hours Worked" => number_format($member['hours'] / 60, 2));
if ($this->GetY() > 260) {
$this->AddPage();
}
$this->addLine($this->GetY(), $line, 5.5);
$this->Line(10, $this->GetY() - 0.5, 200, $this->GetY() - 0.5);
}
} else {
logError($sql . " - " . mysql_error());
}
} catch (Exception $e) {
logError($e->getMessage());
}
}
示例7: while
function __construct($orientation, $metric, $size, $startdate, $enddate, $userid)
{
$dynamicY = 0;
parent::__construct($orientation, $metric, $size);
$this->SetAutoPageBreak(true, 30);
$this->AddPage();
try {
$sql = "SELECT A.*, \n\t\t\t\t\t B.name AS customername, B.accountnumber, \n\t\t\t\t\t\tDATE_FORMAT(A.metacreateddate, '%d/%m/%Y %H:%I') AS metacreateddate, \n\t\t\t\t\t\tDATE_FORMAT(A.converteddatetime, '%d/%m/%Y %H:%I') AS converteddatetime,\n\t\t\t\t\t\tTIMEDIFF(A.converteddatetime, A.metacreateddate) as diff\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}quotation A \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}customer B \n\t\t\t\t\t\tON B.id = A.customerid \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}members C \n\t\t\t\t\t\tON C.member_id = A.takenbyid \n\t\t\t\t\t\tWHERE A.takenbyid = {$userid} \n\t\t\t\t\t\tAND A.metacreateddate >= '{$startdate}' \n\t\t\t\t\t\tAND A.metacreateddate <= '{$enddate}' \n\t\t\t\t\t\tORDER BY A.metacreateddate DESC";
$result = mysql_query($sql);
if ($result) {
while ($member = mysql_fetch_assoc($result)) {
$diff = $member['diff'];
$conversiondate = $member['converteddatetime'];
if (substr($diff, 0, 1) == "-") {
$diff = " ";
}
if (substr($conversiondate, 0, 2) == "00") {
$conversiondate = " ";
}
$line = array("Customer" => $member['customername'], "Customer Code" => $member['accountnumber'], "Quotation Number" => getSiteConfigData()->bookingprefix . "-" . sprintf("%06d", $member['id']), "Quotation Date" => $member['metacreateddate'], "Conversion Date" => $conversiondate, "Time Taken" => $diff, "Total" => number_format($member['total'], 2));
$this->addLine($this->GetY(), $line);
}
} else {
logError($sql . " - " . mysql_error());
}
} catch (Exception $e) {
logError($e->getMessage());
}
}
示例8: Header
function Header()
{
global $title, $vendor;
$this->SetFont('Arial', '', 12);
$this->SetX(-35);
$this->Cell(0, 6, date("M d, Y"), 0, 0, 'R');
$this->Ln(0);
$this->SetFont('Arial', 'B', 14);
$this->Cell(0, 6, $title, 0, 1, 'C');
$this->Ln(1);
$this->SetFont('Arial', 'B', 10);
$this->Cell(50, 6, $vendor, 'B', 0, 'L');
$this->SetX($this->GetX() + 90);
$this->Cell(50, 6, "", 'B', 1, 'L');
$this->Ln(1);
$w = $this->w - $this->lMargin - $this->rMargin;
$this->SetFont('Arial', 'B', 10);
$this->Cell(5 / 100 * $w, 6, "C-No", 1, 0, 'C');
$this->Cell(40 / 100 * $w, 6, "Description", 1, 0, 'C');
$this->Cell(25 / 100 * $w, 6, "Manufacturer No", 1, 0, 'C');
$this->Cell(5 / 100 * $w, 6, "Cost", 1, 0, 'C');
$this->Cell(5 / 100 * $w, 6, "Sale", 1, 0, 'C');
$this->Cell(5 / 100 * $w, 6, "Diff", 1, 0, 'C');
$this->Cell(5 / 100 * $w, 6, "Qty", 1, 0, 'C');
$this->Cell(10 / 100 * $w, 6, "Amount", 1, 0, 'C');
$this->Ln();
//Ensure table header is output
parent::Header();
}
示例9: Header
function Header()
{
global $title, $vehicle, $vendor;
$this->SetFont('Arial', '', 12);
$this->SetX(-35);
$this->Cell(0, 6, date("M d, Y"), 0, 0, 'R');
$this->Ln(0);
$this->SetFont('Arial', 'B', 14);
$this->Cell(0, 6, $title, 0, 1, 'C');
$this->Ln(2);
$this->SetFont('Arial', 'B', 10);
$this->Cell(50, 6, $vendor, 'B', 0, 'L');
$this->SetX($this->GetX() + 90);
$this->Cell(50, 6, $vehicle, 'B', 1, 'L');
$this->Ln(2);
$w = $this->w - $this->lMargin - $this->rMargin;
$this->SetFont('Arial', 'B', 10);
$this->Cell(5 / 100 * $w, 6, "C-No", 1, 0, 'C');
if ($vendor == 'TIK') {
$this->Cell(25 / 100 * $w, 6, "Description", 1, 0, 'C');
$this->Cell(15 / 100 * $w, 6, "Fix Rate", 1, 0, 'C');
} else {
$this->Cell(40 / 100 * $w, 6, "Description", 1, 0, 'C');
}
$this->Cell(15 / 100 * $w, 6, "Model", 1, 0, 'C');
$this->Cell(15 / 100 * $w, 6, "OEM Num", 1, 0, 'C');
$this->Cell(25 / 100 * $w, 6, "Circular Rate", 1, 0, 'C');
$this->Ln();
//Ensure table header is output
parent::Header();
}
示例10: convertStringToDate
function __construct($orientation, $metric, $size, $datefrom)
{
$dynamicY = 0;
$this->dateFrom = $datefrom;
start_db();
parent::__construct($orientation, $metric, $size);
$this->SetAutoPageBreak(true, 30);
$this->AddPage();
try {
$startdate = convertStringToDate($this->dateFrom);
$sql = "SELECT A.name, C.amount,\n\t\t\t\t\t (\n\t\t\t\t\t \t\tSELECT SUM(B.amount) * D.retailprice\n\t\t\t\t\t \t\tFROM {$_SESSION['DB_PREFIX']}eventtransaction B \n\t\t\t\t\t \t\tINNER JOIN {$_SESSION['DB_PREFIX']}product D\n\t\t\t\t\t \t\tON D.id = B.productid \n\t\t\t\t\t \t\tWHERE B.eventid = A.id \n\t\t\t\t\t \t\tAND B.eventdate = '{$startdate}' \n\t\t\t\t\t \t\tAND B.type = 'S'\n\t\t\t\t\t ) AS sold\n\t\t\t\t\t FROM {$_SESSION['DB_PREFIX']}event A \n\t\t\t\t\t LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}eventforecast C\n\t\t\t\t\t ON C.eventid = A.id\n\t\t\t\t\t AND C.forecastdate = '{$startdate}' \n\t\t\t\t\t\tORDER BY A.name";
$result = mysql_query($sql);
if ($result) {
while ($member = mysql_fetch_assoc($result)) {
$sold = $member['sold'] != "" ? $member['sold'] : 0;
$line = array("Event" => $member['name'], "Takings" => "£ " . number_format($sold, 2), "Expected" => "£ " . number_format($member['amount'], 2));
$this->addLine($this->GetY(), $line, 6.2);
}
} else {
logError($sql . " - " . mysql_error());
}
} catch (Exception $e) {
logError($e->getMessage());
}
}
示例11: while
function __construct($orientation, $metric, $size, $startdate, $enddate, $userid)
{
$dynamicY = 0;
parent::__construct($orientation, $metric, $size);
$this->SetAutoPageBreak(true, 30);
$this->AddPage();
try {
$and = "";
if ($startdate != "") {
$and .= " AND A.metacreateddate >= '{$startdate}' ";
}
if ($enddate != "") {
$and .= " AND A.metacreateddate <= '{$enddate}' ";
}
if ($userid != "0") {
$and .= " AND A.takenbyid = {$userid} ";
}
$sql = "SELECT A.*, \n\t\t\t\t\t B.name AS customername, B.accountnumber, \n\t\t\t\t\t C.fullname,\n\t\t\t\t\t\tDATE_FORMAT(A.metacreateddate, '%d/%m/%Y %H:%I') AS metacreateddate\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}quotation A \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}customer B \n\t\t\t\t\t\tON B.id = A.customerid \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}members C \n\t\t\t\t\t\tON C.member_id = A.takenbyid \n\t\t\t\t\t\tWHERE 1 = 1 {$and} \n\t\t\t\t\t\tORDER BY B.name, A.metacreateddate";
$result = mysql_query($sql);
if ($result) {
while ($member = mysql_fetch_assoc($result)) {
$line = array("Customer" => $member['customername'], "Customer Code" => $member['accountnumber'], "Quotation Number" => getSiteConfigData()->bookingprefix . "-" . sprintf("%06d", $member['id']), "User" => $member['fullname'], "Quotation Date" => $member['metacreateddate'], "Value" => number_format($member['total'], 2));
$this->addLine($this->GetY(), $line);
}
} else {
logError($sql . " - " . mysql_error());
}
} catch (Exception $e) {
logError($e->getMessage());
}
}
示例12: Header
function Header()
{
global $ret, $_title;
$this->SetFont('Arial', '', 6);
$this->SetX(-35);
$this->Cell(0, 6, date("M d, Y"), 0, 0, 'R');
$this->Ln(0);
$this->SetFont('Arial', 'I', 6);
$this->SetX($this->lMargin);
$this->Cell(0, 6, 'Report generated by nexexcel.com', 0, 0, 'L');
$this->Ln(0);
$t = $_title;
if (isset($_GET['account_class']) && strlen($_GET['account_class']) > 0) {
$t .= " - " . $_GET['account_class'];
}
$this->SetFont('Arial', 'B', 8);
$this->Cell(0, 6, $t, 0, 1, 'C');
$this->Ln(2);
$this->SetFont('Arial', '', 8);
$this->Cell(30, 6, "Account Name", 0, 0, 'L');
$this->Cell(63, 6, $ret['account_name'], 'B', 0, 'L');
$this->SetX($this->GetX() + 25);
$this->Cell(35, 6, "Opening Balance", 0, 0, 'L');
$this->Cell(37, 6, number_format($ret['aob']), 1, 1, 'R');
if (strlen($ret['party_address']) > 0) {
$this->Cell(30, 6, "Party Address", 0, 0, 'L');
$this->Cell(63, 6, $ret['party_address'], 'B', 1, 'L');
}
$this->Ln(5);
//Ensure table header is output
parent::Header();
}
示例13: Header
function Header()
{
$this->SetFont('Arial', '', 8);
$this->SetX(-35);
$this->Cell(0, 6, date("M d, Y"), 0, 0, 'R');
$this->Ln(0);
$this->printTitle();
//Ensure table header is output
parent::Header();
}
示例14: Header
function Header()
{
$this->SetFont('Arial', 'B', 18);
// $this->Cell(0, 6, $_SESSION['companyname'], 0, 0, 'C');
$this->SetFont('Arial', '', 12);
$this->SetX(-35);
$this->Cell(0, 6, date("M d, Y"), 0, 0, 'R');
$this->Ln(0);
$this->printTitle();
//Ensure table header is output
parent::Header();
}
示例15: Header
function Header()
{
$this->SetFont('Arial', '', 12);
$this->SetX(-35);
$this->Cell(0, 6, date("M d, Y"), 0, 0, 'R');
$this->Ln(0);
$this->printTitle();
$this->Cell(94.999527777778, 6, 'Karachi', 1, 0, 'C', false);
$this->Cell(94.999527777778, 6, 'Lahore', 1, 0, 'C', false);
$this->Ln();
//Ensure table header is output
parent::Header();
}