我在打印时遇到问题

zsq822 2004-01-08 03:56:20
我想打印一个表中的内容,但只有一个字段的内容特别长,我想用两个类型为rbdetail的qrband,但只能显示一个类型为rbdetail的qrband的内容,为什么那,请教解决
...全文
22 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
konhon 2004-01-09
  • 打赏
  • 举报
回复
用一个QrMemo控件呀。

这个控件结合Memo控件一起使用,可以实现自动折行。

给你贴一个函数吧。
procedure lineBreakQRMemo(text: string; const textMemo: TMemo; const QRMemo: TQRMemo);
var
i: integer;
begin
textMemo.Width := QRMemo.Width;
textMemo.Height := QRMemo.Height;
textMemo.Font.Name := QRMemo.Font.Name;
textMemo.Font.Size := QRMemo.Font.Size;
textMemo.Text := text;
QRMemo.Lines.Clear;
for i := 0 to textMemo.Lines.Count - 1 do
QRMemo.Lines.Add(textMemo.Lines.Strings[i]);
end;
在QrBand的BeforePrint事件下,调用这个函就可以啦。

2,497

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧