为什么只能打印第一页?

lwluser 2002-07-03 03:59:29
我在 TQuickRep 上放了一个 TQRRichText ,要打印的是TQRRichText 的内容,为什么
不论要打印的文字有多长, TQuickRep 只能打印第一页的内容,而且预览时总页数都只
有一页(Page 1 of 1),如果一页打印不完,后面的就文字就不会打印出来了,请高手帮
帮了?谢谢!


...全文
250 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
lwluser 2002-07-05
  • 打赏
  • 举报
回复
还想请问一下 ihihonline(小小->充电中……) vPrint 是什么啊?
lwluser 2002-07-05
  • 打赏
  • 举报
回复
呵呵,我用的就是HP打印机!
ihihonline 2002-07-05
  • 打赏
  • 举报
回复
代码?50
少来点
procedure TForm2.Button1Click(Sender: TObject);
begin
Form1.QRMemo1.Lines := Memo1.Lines;
Form1.vPrint;
QRCompositeReport1.Preview;
Application.MessageBox('Game Over !!!','GAME OVER',mb_ok+mb_iconinformation);
end;

procedure TForm2.Button2Click(Sender: TObject);
begin
Label1.Caption :=IntToStr(Memo1.Lines.Capacity);
end;

procedure TForm2.QRCompositeReport1AddReports(Sender: TObject);
begin
if Count < Memo1.Lines.Count-1 then
begin
QRCompositeReport1.Reports.Add(Form1.QuickRep1);
QRCompositeReport1.Reports.Add(Form3.QuickRep1);
end else
QRCompositeReport1.Reports.Add(Form1.QuickRep1);
end;

end.

-------------------------------------------------------
有程序的
-----------------------.dfm
object Form2: TForm2
Left = 192
Top = 107
Width = 544
Height = 375
Caption = 'Form2'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 176
Top = 8
Width = 32
Height = 13
Caption = 'Label1'
end
object Memo1: TMemo
Left = 32
Top = 24
Width = 401
Height = 265
Lines.Strings = (
' 自我简介'
'0'
'1'
'2'
'3'
'4'
'5'
'6'
'7'
'8'
'9'
'10'
'11'
'12'
'13'
'14'
'15'
'16'
'17'
'18'
'19'
'20'
'21'
'22'
'23'
'24'
'25'
'26'
'27'
'28'
'29'
'30'
'31'
'32'
'33'
'34'
'35'
'36'
'37'
'38'
'39'
'40'
'41'
'42'
'43'
'44'
'45'
'46'
'47'
'48'
'49'
'50'
'51'
'52'
'53'
'54'
'55'
'56'
'57'
'58'
'58'
'60'
'61'
'62'
'63'
'64'
'65'
'66'
'67')
ScrollBars = ssVertical
TabOrder = 0
end
object Button1: TButton
Left = 136
Top = 304
Width = 75
Height = 25
Caption = 'Button1'
TabOrder = 1
OnClick = Button1Click
end
object Button2: TButton
Left = 248
Top = 304
Width = 75
Height = 25
Caption = 'Button2'
TabOrder = 2
OnClick = Button2Click
end
object QRCompositeReport1: TQRCompositeReport
OnAddReports = QRCompositeReport1AddReports
Options = []
PrinterSettings.Copies = 1
PrinterSettings.Duplex = False
PrinterSettings.FirstPage = 0
PrinterSettings.LastPage = 0
PrinterSettings.OutputBin = Auto
PrinterSettings.Orientation = poPortrait
PrinterSettings.PaperSize = Letter
Left = 176
Top = 72
end
end
fredfei 2002-07-05
  • 打赏
  • 举报
回复
看看打印机吧,有一些usb打印机在win98下的确存在这种问题
还有hp的打印机也会出现这种情况,不过有的可以使用图形方式打印出来
菩提小树 2002-07-05
  • 打赏
  • 举报
回复
同意 surfguy(冲浪小子)
应该可以!
lwluser 2002-07-04
  • 打赏
  • 举报
回复
谢谢你的回答,你所说的这些我都试过了不行,把以在没有招的时候我只有选择在
这里提问了!
jyqkr 2002-07-03
  • 打赏
  • 举报
回复
你可以把TQRRichText的autostretch属性设为true,然后将TQRRichText所在的qrband的forcenewpage属性设为true,试一试。
lwluser 2002-07-03
  • 打赏
  • 举报
回复
谢谢你,能间单地写几行代码让我看看吗?感激不尽!
surfguy 2002-07-03
  • 打赏
  • 举报
回复
先设好tqrrichtext的最大行数,你可以设好当输入tqrrichtext的文本行大于tqrrichtext的最大行数时,就强制newpage,在上面再放入一个tqrrichtext就行了。

5,402

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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