请问,JSP中如何实现报表打印?有没有现成打印控件?

icerose 2001-06-17 12:38:00
...全文
508 点赞 收藏 21
写回复
21 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
y1g1y1 2001-10-14
http://www.yueliangwan.com.cn/yf/PrintView/PrintView.htm
回复
icerose 2001-07-13
swollow():
javascrip如何控制excel?如何实现?
回复
icerose 2001-07-06
swollow():
javascrip如何控制excel?如何实现?
回复
swollow 2001-07-05
你可以试一试下面的办法:
在服务器端做一个Servlet,在用户端打印请求时,在Servlet中向客户端返回
带有控制Excel的javascript(同时应通过Excel对象将打印数据也写到Excel表格中),
返回到客户端时javascript会自动执行,这样在客户端就会弹出带有打印数据的
Excel窗口。
用以上方法,对服务器的OS没有限制,Linux和Win均可用,但有一个缺点,
就是客户端必须安装Excel。
如果哪位同志有更好的方法,请告一声。
回复
nintyuui 2001-07-05
关注
回复
icerose 2001-06-29
evergreen(永远的绿):
那个控件在什么地方?谢谢
回复
beyondii 2001-06-29
关注
回复
icerose 2001-06-20
rover(江湖浪子) :
万岁!
请问哪里有下载?
如何用?
谢谢!!!
回复
evergreen 2001-06-20
附加说以声,该控件还可以设置打印机、打印边界、纸张等,就象标准的windows打印对话框一样!
回复
evergreen 2001-06-20
如果OS是windows,而且客户端是IE,那么有一个非常棒的控件:ScriptX
<object id="factory" style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" viewastext
codebase="../control/ScriptX.cab#Version=5,0,4,185" width="0" height="0">
</object>
<script language=JavaScript>
function PrintWin()
{
var oldDir = factory.printing.portrait ;//保存旧的打印方向
factory.printing.portrait = false;//横向打印
factory.printing.header = "" ;//页眉为空
factory.printing.footer = "" ;//页脚为空

button1.style.display = "none";//隐藏『打印』按扭
CloseWin.style.display = "none";//隐藏『关闭窗口』按扭

factory.printing.Print(true,window);
button1.style.display = "";//显示『打印』按扭
CloseWin.style.display = "";//显示『关闭窗口』按扭
factory.printing.portrait = oldDir ;//恢复旧的打印方向
}
</script>
回复
rover 2001-06-20
http://www.tidestone.com/
回复
icerose 2001-06-19
Formula One!!!!!是什么?我是新手。
回复
rover 2001-06-19
是一个兼容Excel的报表控件,我用过其ActiveX的,java的还没用过。
其实用ActiveX控件也行。
回复
mikej 2001-06-18
没有:(
具体如何实现我也没有时间去研究,你去那个站点上看看把,技术支持很全面的
几乎所有的class都在那里可以找到原型函数。
回复
icerose 2001-06-18
mikej(胖胖) 
没有中文的吗?
我要印的是B5的纸。
回复
rover 2001-06-18
有啊。用Formula One就行
回复
datapub 2001-06-18
可以用XML加javascript结合实现,具体怎么实现大家可以去查查相关资料!
回复
mikej 2001-06-17
我刚才看了一下,可能需要做成applet来实现。呵呵,应该不难。
回复
mikej 2001-06-17
Package java.awt.print
Provides classes and interfaces for a general printing API.
See:
Description

Interface Summary
Pageable The Pageable implementation represents a set of pages to be printed.
Printable The Printable interface is implemented by the print methods of the current page painter, which is called by the printing system to render a page.
PrinterGraphics The PrinterGraphics interface is implemented by Graphics objects that are passed to Printable objects to render a page.


Class Summary
Book The Book class provides a representation of a document in which pages may have different page formats and page painters.
PageFormat The PageFormat class describes the size and orientation of a page to be printed.
Paper The Paper class describes the physical characteristics of a piece of paper.
PrinterJob The PrinterJob class is the principal class that controls printing.


Exception Summary
PrinterAbortException The PrinterAbortException class is a subclass of PrinterException and is used to indicate that a user or application has terminated the print job while it was in the process of printing.
PrinterException The PrinterException class and its subclasses are used to indicate that an exceptional condition has occurred in the print system.
PrinterIOException The PrinterIOException class is a subclass of PrinterException and is used to indicate that an IO error of some sort has occurred while printing.



Package java.awt.print Description
Provides classes and interfaces for a general printing API. The API includes such features as:

the ability to specify document types
mechanisms for control of page setup and page formats
the ability to manage job control dialogs

Since:
1.2


具体函数包如何使用可以参考http://student.cs.tsinghua.edu.cn/program/handbook/javaapi/index.html
回复
windygirl 2001-06-17
关注
回复
加载更多回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2001-06-17 12:38
社区公告
暂无公告