我查了一下午了,都只说css什么的,没有具体例子。。。
6 个解决方案
#1
#2
ocx有没这方面的例子呢?学习下!谢谢了!
#3
每页打印几条可以通过控制表格的行高来实现,耐心点调一下就好,页眉页脚的设置可以用下面的代码来做。
factory.printing.header = "&b广东省经济贸易委员会发文登记表&b";//设置页眉
factory.printing.footer = "&b打印日期:&D 第&p页 共&P页&b";//设置页脚
如果想每页都自动打印表格头的话就。。。。。。。。。。我现在也想知道应该怎么搞。
factory.printing.header = "&b广东省经济贸易委员会发文登记表&b";//设置页眉
factory.printing.footer = "&b打印日期:&D 第&p页 共&P页&b";//设置页脚
如果想每页都自动打印表格头的话就。。。。。。。。。。我现在也想知道应该怎么搞。
#4
很难 免费的? 不行 很难 scriptX只是一个控件 所见即所打 分页都要在你程序中自己设置
#5
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>report forms</title>
<style type="text/css">
@media print {.toolbar {display: none;}}
.paging {page-break-after:always;}
</style>
<script type="text/javascript">
function window.onload(){
factory.printing.header="&D &w";
factory.printing.footer="第&p页,共&P页";
factory.printing.portrait=false;
}
</script>
</head>
<body>
<div class='toolbar'>
<object id="factory" style="display: none;" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="smsx.cab#Version=6,5,439,50">
</object>
<input type="button" value="打印本页" onclick="factory.printing.print(false)" >
<input type="button" value="页面设置" onclick="factory.printing.PageSetup()" >
<input type="button" value="页面预览" onclick="factory.printing.Preview()" >
</div>
<table width="100%" border="1">
<thead style="display:table-header-group; font-weight:bold">
<tr><th colspan="5">报 表</th></tr>
<tr>
<th>NO1</th>
<th>NO2</th>
<th>NO3</th>
<th>NO4</th>
<th>NO5</th>
</tr>
</thead>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
</table>
</body>
</html>
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>report forms</title>
<style type="text/css">
@media print {.toolbar {display: none;}}
.paging {page-break-after:always;}
</style>
<script type="text/javascript">
function window.onload(){
factory.printing.header="&D &w";
factory.printing.footer="第&p页,共&P页";
factory.printing.portrait=false;
}
</script>
</head>
<body>
<div class='toolbar'>
<object id="factory" style="display: none;" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="smsx.cab#Version=6,5,439,50">
</object>
<input type="button" value="打印本页" onclick="factory.printing.print(false)" >
<input type="button" value="页面设置" onclick="factory.printing.PageSetup()" >
<input type="button" value="页面预览" onclick="factory.printing.Preview()" >
</div>
<table width="100%" border="1">
<thead style="display:table-header-group; font-weight:bold">
<tr><th colspan="5">报 表</th></tr>
<tr>
<th>NO1</th>
<th>NO2</th>
<th>NO3</th>
<th>NO4</th>
<th>NO5</th>
</tr>
</thead>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
</table>
</body>
</html>
#6
<p style=page-break-before:always></p>要分页的时候加上这个代码,就可以了!
#1
#2
ocx有没这方面的例子呢?学习下!谢谢了!
#3
每页打印几条可以通过控制表格的行高来实现,耐心点调一下就好,页眉页脚的设置可以用下面的代码来做。
factory.printing.header = "&b广东省经济贸易委员会发文登记表&b";//设置页眉
factory.printing.footer = "&b打印日期:&D 第&p页 共&P页&b";//设置页脚
如果想每页都自动打印表格头的话就。。。。。。。。。。我现在也想知道应该怎么搞。
factory.printing.header = "&b广东省经济贸易委员会发文登记表&b";//设置页眉
factory.printing.footer = "&b打印日期:&D 第&p页 共&P页&b";//设置页脚
如果想每页都自动打印表格头的话就。。。。。。。。。。我现在也想知道应该怎么搞。
#4
很难 免费的? 不行 很难 scriptX只是一个控件 所见即所打 分页都要在你程序中自己设置
#5
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>report forms</title>
<style type="text/css">
@media print {.toolbar {display: none;}}
.paging {page-break-after:always;}
</style>
<script type="text/javascript">
function window.onload(){
factory.printing.header="&D &w";
factory.printing.footer="第&p页,共&P页";
factory.printing.portrait=false;
}
</script>
</head>
<body>
<div class='toolbar'>
<object id="factory" style="display: none;" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="smsx.cab#Version=6,5,439,50">
</object>
<input type="button" value="打印本页" onclick="factory.printing.print(false)" >
<input type="button" value="页面设置" onclick="factory.printing.PageSetup()" >
<input type="button" value="页面预览" onclick="factory.printing.Preview()" >
</div>
<table width="100%" border="1">
<thead style="display:table-header-group; font-weight:bold">
<tr><th colspan="5">报 表</th></tr>
<tr>
<th>NO1</th>
<th>NO2</th>
<th>NO3</th>
<th>NO4</th>
<th>NO5</th>
</tr>
</thead>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
</table>
</body>
</html>
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>report forms</title>
<style type="text/css">
@media print {.toolbar {display: none;}}
.paging {page-break-after:always;}
</style>
<script type="text/javascript">
function window.onload(){
factory.printing.header="&D &w";
factory.printing.footer="第&p页,共&P页";
factory.printing.portrait=false;
}
</script>
</head>
<body>
<div class='toolbar'>
<object id="factory" style="display: none;" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="smsx.cab#Version=6,5,439,50">
</object>
<input type="button" value="打印本页" onclick="factory.printing.print(false)" >
<input type="button" value="页面设置" onclick="factory.printing.PageSetup()" >
<input type="button" value="页面预览" onclick="factory.printing.Preview()" >
</div>
<table width="100%" border="1">
<thead style="display:table-header-group; font-weight:bold">
<tr><th colspan="5">报 表</th></tr>
<tr>
<th>NO1</th>
<th>NO2</th>
<th>NO3</th>
<th>NO4</th>
<th>NO5</th>
</tr>
</thead>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
<tr class='paging'>
<td>test1</td>
<td>test2</td>
<td>test3</td>
<td>test4</td>
<td>test5</td>
</tr>
</table>
</body>
</html>
#6
<p style=page-break-before:always></p>要分页的时候加上这个代码,就可以了!