我看过一个别人的方法就是在打印时用了QRShape这个来做表格。可它和数据的多少有关系,必须使数据表的数据保持一定的数量(他是用了添加空数据来实现),这样才能使数据表格完整,不会出现只有一个数据那一页只有一个格子的现象。 不知道还有别的方法直接能画出整个表格吗?
解决方案 »
- 急! 在线等!做了一下午不明白!
- 如果在进行udp编程时,如果想让程序既能发送,也能接收,该用什么控件,怎么作?
- 请各位大哥大姐帮忙
- 打印问题,明天晚上结贴!(100分)
- 作复杂报表,中国式报表用什么控件最好。下载地址?
- 倾囊而尽,我哭了。请问关于ttable中记录查询的问题,在线等待。
- ADO的问题?
- 今天我写了几个中国象棋的函数,请各位高手指点指点,谢谢!
- 怎样调用VC++作的DLL!
- 请教各位前辈,如何控制鼠标只能在dbgrid中的一个单元格中移动,如果控制在其他控件上,则为clipcursor(控件名称.boundsrect),但dbgrid的某一个单元格如何来引用呢?
- 再一个简单的问题
- 子系统架构问题
PageFooterBand1上畫好表格,每個qrshape上放QRLabel,
在DetailBand1BeforePrint將記錄給QRLabel,
table記錄最大的個數應跟表格行數是一樣.
中进行判断,可控制打印行数、不足一页用空行填满。
m,n,I:integer;
begin
n:=table1.RecordCount;
m:=n mod 56;
If m<>0 then
m:=56-m;
For I:=1 to m do
begin
table1.Append;
table1.Post;
然后在页脚的onbeforeprint事件中添加脚本:
while freespace>child.height then
begin
showband(child);//child为子band的名称
end;
//qr不要設置dataset(即為空),BeforePrin裡面dataset.first;//設置為第一記錄
//在onneeddata裡面,
//因為以前搞過,都過了比較久了,你試試看看行不行
if not ADOQuery1.Eof then
begin
QRLabel2.Caption:=ADOQuery1.Fields[1].AsString;
QRLabel3.Caption:=ADOQuery1.FieldByName('SL').AsString;//+ADOQuery1.FieldByName('DW').AsString;
ADOQuery1.Next; if i<=20 then
MoreData:=true
else
begin
QuickRep1.NewColumn;
i:=0;
MoreData:=true;
end;
end
else
begin
QRLabel2.Caption:='';
QRLabel3.CaptioN:=''; if i=20 then
MoreData:=false;
end;
你参考一下