与其用FastReport不如用Report Machine这个控件包是基于FastReport,并作了适当的修改,并增加了两个控件: TGridReport:直接打印TDBGrid构件. TwwGridReport:直接打印InfoPower中的TwwDBGrid构件. TRMFormReport: 直接打印Form(酷)特点: - Band-oriented report generator. - Build-in powerful designer, also available in run-time. - Preview like in MS Word. - Fast like QuickReport. - Compact code - w/o designer smaller than QR2. - Unlimited number of pages in prepared report. - Multi-page reports; composite reports; subreports; groups; multi-column reports; master-detail-detail reports; cross-tab reports; two-pass reports; "live" reports. - Full control over printing process; support all paper sizes. - Set of most useful components: Text, Line, Picture, Shape, OLE object, RichText, RX Rich 2.0, Chart, Barcode. - TXT, RTF, CSV, HTML export (RTF and HTML - with pictures). - Add-in component TRMDataStorage intended for creating tables and queries in run-time like QRDesigner does. Especially for end-user reports. Supports Interbase Express (IBX) and ActiveX Data Objects (ADO). - Editing pages of prepared report. - Built-in Pascal-like interpreter for handling of building process. - Report form can store in DFM resources, external file, BLOb field of DB table, or in stream. - Ability of expanding functionality by own report components, wizards, function libraries. Report Machine是一个For Delphi 3,4,5,6的报表控件包,特点 您可以通过 http://rmachine.yeah.net/ 获得Report Machine的最新信息.
打印的长度就可以了!
printer.canvas.textRect();
输出的是Trect类型关键的就是算出每一行的width,Height,已经打印的width,Height,也许还有其他的数据,这要看你的要求而定,再有你说‘我的人员可能有七八十人或更多’这不是问题!
你一个人可以输出,那只要记住已经打印的Height,下次就从它之后打印就行了,如果超出一页就清空已经打印的height这样就行了!好了,基本思路就是这样!
有没有简单的方法,webbrowse我还不会
http://www.csdn.net/Expert/topic/509/509268.shtm
主要用print canvas lineto moveto textout等控制。
先用尺量一下A4纸的大小尺寸,看每个人的信息表格格式应该是一样的,看在一张A4纸上能打几个人的信息再写一段程序控制一下就行了
容易出问题
assignfile(f,'lpt1');
writeln(f,打印的内容 );
如下
供参考(对QREPORT而言)
QuickRep1.Page.PaperSize:=Customing;
QuickRep1.Page.Length:=100;
QuickRep1.Page.Column:=2;
......
只要设置QuickRep1.Page属性,可以得到任意的格式
TGridReport:直接打印TDBGrid构件.
TwwGridReport:直接打印InfoPower中的TwwDBGrid构件.
TRMFormReport: 直接打印Form(酷)特点:
- Band-oriented report generator.
- Build-in powerful designer, also available in run-time.
- Preview like in MS Word.
- Fast like QuickReport.
- Compact code - w/o designer smaller than QR2.
- Unlimited number of pages in prepared report.
- Multi-page reports; composite reports; subreports; groups;
multi-column reports; master-detail-detail reports;
cross-tab reports; two-pass reports; "live" reports.
- Full control over printing process; support all paper sizes.
- Set of most useful components: Text, Line, Picture, Shape, OLE object,
RichText, RX Rich 2.0, Chart, Barcode.
- TXT, RTF, CSV, HTML export (RTF and HTML - with pictures).
- Add-in component TRMDataStorage intended for creating tables and queries
in run-time like QRDesigner does. Especially for end-user reports. Supports
Interbase Express (IBX) and ActiveX Data Objects (ADO).
- Editing pages of prepared report.
- Built-in Pascal-like interpreter for handling of building process.
- Report form can store in DFM resources, external file, BLOb field
of DB table, or in stream.
- Ability of expanding functionality by own report components, wizards,
function libraries.
Report Machine是一个For Delphi 3,4,5,6的报表控件包,特点
您可以通过 http://rmachine.yeah.net/ 获得Report Machine的最新信息.
结果是如果你连续打印多张是没有问题,
但是如果你先打印一张,然后再打印一张,那么中间打印一张以后
打印机照样会卷纸,第二张还是要换页打印
可以设置纸张的大小为你要得表格的大小
然后写canvas就可以了