修改fastreport实现页尾补空白行或打印固定行数
来源:互联网 发布:mac无法开机 编辑:程序博客网 时间:2024/04/30 03:06
刚刚实现成功,“页尾剩余补空白行”和“打印固定行数”两种模式
代码:
frxClass加:
//在DataBand末尾加空白行
//abcNone不启用,abcByRecordCount按记录数加,abcByFreeSpace按页面剩余空间加
TfrxAppendBlankCells = (abcNone, abcByRecordCount, abcByFreeSpace);
TfrxDataBand位置加:
published
//在DataBand末尾加空白行 --2014-12-1--
property AppendBlankCells: TfrxAppendBlankCells read FAppendBlankCells write FAppendBlankCells default abcNone;
public
BlankCells: Boolean;//此属性为true,块内文本框的不显示文字
改函数
procedure TfrxCustomMemoView.GetData;
.....
if IsDataField then
begin
//Band在BlankCells模式下不打印文字,这样就可能通过Band的RowCount指定固定的打印行数 --Conch 2014-12-1--
if (Parent is TfrxDataBand) and (TfrxDataBand(Parent).BlankCells) then
FMemo.Text := ''
else
if DataSet.IsBlobField(DataField) then
begin
.....
frxEngine加:
procedure ShowBandTree(Obj: TObject);函数加:
Label Loop_AppendBlank;
for i := 0 to Bands.Count - 1 do
begin
..........
ResetSuppressValues(b);
//在Band末尾追加空行,这样就可能通过Band的RowCount指定固定的打印行数 --2014-12-1--
b.BlankCells := false;
Loop_AppendBlank:
while not b.DataSet.Eof do
end;
//在DataBand末尾追加空行,这样就可能通过Band的RowCount指定固定的打印行数 --2014-12-1--
if (b.AppendBlankCells <> abcNone) and (not b.BlankCells)
and ( ((b.AppendBlankCells = abcByRecordCount) and (b.DataSet <> nil) and (b.RowCount > 0) and (b.FLineThrough <= b.RowCount))
or ((b.AppendBlankCells = abcByFreeSpace) and (b.Height <= FreeSpace))
)
then begin
b.Stretched := false;//禁止扩大高度
b.BlankCells := true;
if b.AppendBlankCells = abcByRecordCount then begin
//挂接成虚拟数据集
b.DataSet := b.VirtualDataSet;
b.VirtualDataSet.RangeEndCount := b.RowCount - b.FLineThrough + 1;
b.DataSet.Initialize;
goto Loop_AppendBlank;
end
else if b.AppendBlankCells = abcByFreeSpace then
//循环产生内容,直接剩余空间放不下
while b.Height <= FreeSpace do begin
CurLine := b.FLineN;
CurLineThrough := b.FLineThrough;
DoShow(b);
Inc(b.FLineN);
Inc(b.FLineThrough);
end;
end;
完工。
----作者:狂歌,Q63823961(无事勿扰,通常不作答),转载请注明出版--------
- 修改fastreport实现页尾补空白行或打印固定行数
- FastReport.net每页打印固定行数
- FastReport打印固定行
- FastReport.net每页打印固定行数二
- fastreport打印空白行的方法
- fastreport固定行分页
- fastreport固定行分页
- XML Publisher中需要实现每页打印固定行数
- FastReport(预览,修改,打印)
- FastReport设置0值打印时为空白
- dw每页打印固定行数
- FastReport打印
- FastReport 中如何实现正反面打印
- FastReport打印TListView数据的实现
- 在报表中打印固定行(不足时补充空行)----使用fastreport 4.6 和 Delphi 7
- 在fastreport中打印空白表格及小写金额转大写金额
- FastReport分组打印并且指定每页行数(不足填空行)
- FastReport.net每页打印合计数的实现
- Rest应用于SpringMVC项目
- 淘宝网服装
- C#图解—Windows Forms数据绑定技术
- Linux下MySQL忘记root密码 1.2
- set theme for fragment (ViewpagerIndicator Tab)
- 修改fastreport实现页尾补空白行或打印固定行数
- 黑马程序员——JAVA基础之反射
- 同步互斥阻塞异步
- webView API
- 计算机工作原理-CPU的内部架构和工作原理
- 经常在.net中使用的下载链接地址
- Apache Felix HTTP Service
- 数据结构之基础个人理解(一)
- Struts2的文件上传与下载