All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
Asp.net中防止用户多次登录的方法_[Asp.Net教程]_0
php上传文件功能函数_php资料_编程技术
Linux系统下PhpMyAdmin目录的安全管理_php资料_编程技术
用C#实现智能设备上的NotifyIcon类_.net资料_编程技术
经典文萃:Ajax技术的安全问题不容忽视_.net资料_编程技术
获取SqlServer2005数据库表结构的方法_[SQL Server教程]
PHP环境下配置在线编辑器FCKeditor_[PHP教程]
asp.net,自定义分页控件_[Asp.Net教程]
Visual,C#,2.0匿名方法揭密_.net资料_编程技术
PHP实例:多文件上传的例子_[PHP教程]
Reading number is top 10 pictures
姑娘手慢了,已经走光了
A man's favorite things8
The real super beauty2
Beautiful Japanese beauty(漂亮的日本美女)
Small QiShu -- ShuangShuangPan2
汪峰的梦想
两张抽象画
真正的国产-非模拍 贵在是真实1
赵惟依写真1
Wear bikinis cock
Download software ranking
Unix video tutorial4
仙剑奇侠传98版歌曲
Tram sex maniac 2 (H) rar bag5
Tram sex maniac 2 (H) rar bag2
Boxer's Top ten classic battle6
Wild things 2
Boxer's Top ten classic battle2
网络管理员第三版
Proficient in Eclipse
Ashlynn Video4














rec_sql = "SELECT * FROM rec WHERE rec_plant = 'SJ01' ORDER BY rec_id DESC";
rec_res = mysql_query(rec_sql);
rec_num = mysql_num_rows(rec_res);

if(rec_num>0){
for (i = 0; i < rec_num; i++){
re++;
rec_row = mysql_fetch_array(rec_res);

part_sql = "SELECT pt_desc FROM part WHERE pt_part='".rec_row['rec_part']."' ";
part_res = mysql_query(part_sql);
part_row = mysql_fetch_array(part_res);


echo'


'.(i+1).'


'.rec_row['rec_vendor'].'


'.rec_row['rec_part'].'


'.part_row['pt_desc'].'


'.rec_row['rec_pur_um'].'


'.substr(rec_row['rec_req_date'], 0, 10).'


'.number_format(rec_row['rec_req_qty'], 2).'


'.number_format(rec_row['rec_rec_qty'],2).'


'.number_format(rec_row['rec_rec_qty'],2).'


'.substr(rec_row['rec_iqc_date'], 0 ,10).'


'.rec_row['rec_notes'].'


';

//每页只打印10条记录,如果记录数是10的倍数后,显示'***End of Report***'并开始打印下一页
if(re%10 == 0 and re != rec_num){
echo'



*** End of Report ***




';
//下一页开始打印
echo '

&nbsp;







Program :
bom_pro.php
'.SP10.'
Date/Time :
'.date("Y-m-d").'/'.date("H:i:s").'






Plant :
SJ01
'.SP10.'
User Name :
lucas






Receiving Date :
'.date('Y-m-d').'
'.SP10.'
Page :
';echo re/10+1;echo'






&nbsp;





















';
}
}

echo'



*** End of Report ***







onclick="window.print()">




onclick="window.close()">





';
}
else{
echo'
归海一刀 published in(发表于) 2014/2/17 7:13:41 Edit(编辑)
PHP+CSS实现打印简单数据报表功能_[PHP教程]

PHP+CSS实现打印简单数据报表功能_[PHP教程]

PHP+CSS实现打印简单数据报表功能_[PHP教程]


PHP+CSS实现打印简单数据报表功能


功能:实现打印日报表的功能,定义了专门的打印样式,隐藏了不该打印的控件并实现了分页打印功能,表名:rec 字段:rec_id,rec_po,rec_part,rec_plant,rec_vendor,rec_pur_um,rec_req_date,rec_req_qty,rec_rec_qty,rec_iqc_date,rec_notes


完整源代码如下:





Daily Report




define ("SP10" ,'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
global re;
function db_link()
{
access_id = "root";
access_pwd = "831025";
db_name = "inv";
@ db = mysql_connect('localhost', access_id, access_pwd) or
die("Could not connect to database. Please contact with IT supporting team ASAP.");
mysql_query("SET NAMES 'GBK'");
mysql_select_db(db_name);
return db;
}
link=db_link();
?>






Program :


bom_report.php





Date/Time :









Plant :


SJ01





User Name :


liuxueping






Receiving Date :








Page :


1




&nbsp;








No. Vendor Part Description UM Require Date Require Qty Deliver Qty Receive Qty IQC Remark No. Vendor Part Description UM Require Date Require Qty Deliver Qty Receive Qty IQC Remark


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.