報表預覽放大問題 .我是用DELPHI6.0. 高手快來幫我看看! 謝謝 (20分)

我當然通過了,我目前正在做進銷存,自己用的就是這個。
 
已經將代碼發到你的郵箱,請接收!
 
TO:hotboys
老兄,你發了嗎?我沒有收到! 這個bv@163.com是你的信箱嗎? 這裡面什麼附件都沒有! 請檢查! 謝謝!
 
沒收到?那我再發一次,你說的那個地址不是我的。
 
TO:hotboys
那就沒有收到! 請發fwcy@sohu.com和fwcy2002@21cn.com!
謝謝!
 
TO:hotboys
我的QQ是56978718,請加我用QQ傳!
 
TO:hotboys
已經收到! 七個文件。但是不能編譯和運行! 編譯和運行都是灰色的! 怎麼處理?
 
老兄,這只是單元文件,又不是工程文件,當然不能運行,你先建立一個工程文件,再把我的這兩個單元加進去呀。
先給分呀。
 
TO:hotboys
我先建立一個新工程文件form1。然後加入FBaseReport單元。再在form1添加BitBtn1按鈕.然後寫入:procedure TForm1.BitBtn1Click(Sender: TObject);
begin
BaseReport.show;
end;
運行後點擊BitBtn1,出現灰色的預覽畫面! 沒有任何內容或空白頁! 這是什麼問題呢?怎樣解決?或者請你傳一個可以運行的給我!
這個帖子的分數太少啦,真不好意思麻煩你啦! 我是剛學delphi的!
另外我還有一貼http://www.delphibbs.com/delphibbs/dispq.asp?lid=2234178你去看看!如果沒有很好的解決答案,我會再從哪個帖子至少分一半分給你!

 
TO:hotboys
你究竟有沒有可執行且通過的代碼?有的話怎麼還沒有EMAIL給我呢?
 
用rb嘛,比qr好用多了
 
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, QuickRpt, QRCtrls, ExtCtrls, QRPrev;
const
My_Msg_display = wm_user + 400;
type
TForm1 = class(TForm)
QuickRep1: TQuickRep;
TitleBand1: TQRBand;
QRLabel1: TQRLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormChange(Sender: TObject);
procedure MyZoomClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
QuickRep1.Preview;
end;

procedure TForm1.FormChange(Sender: TObject);
begin
if screen.ActiveForm = nil then
exit;
if sametext('TQRStandardPreview', screen.ActiveForm.ClassName) then
begin
TQRStandardPreview(screen.ActiveForm).ZoomToWidth.OnClick := MyZoomClick;
end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
screen.OnActiveFormChange := FormChange;
end;

procedure TForm1.MyZoomClick(Sender: TObject);
begin
if screen.ActiveForm = nil then
exit;
if sametext('TQRStandardPreview', screen.ActiveForm.ClassName) then
begin
TQRStandardPreview(screen.ActiveForm).QRPreview.Zoom := 200;
end;

end;

end.

object Form1: TForm1
Left = 192
Top = 107
Width = 544
Height = 375
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Scaled = False
WindowState = wsMaximized
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object QuickRep1: TQuickRep
Left = 24
Top = 120
Width = 794
Height = 1123
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Arial'
Font.Style = []
Functions.Strings = (
'PAGENUMBER'
'COLUMNNUMBER'
'REPORTTITLE')
Functions.DATA = (
'0'
'0'
'''''')
Options = [FirstPageHeader, LastPageFooter]
Page.Columns = 1
Page.Orientation = poPortrait
Page.PaperSize = A4
Page.Values = (
100
2970
100
2100
100
100
0)
PrinterSettings.Copies = 1
PrinterSettings.Duplex = False
PrinterSettings.FirstPage = 0
PrinterSettings.LastPage = 0
PrinterSettings.OutputBin = Auto
PrintIfEmpty = True
SnapToGrid = True
Units = MM
Zoom = 100
object TitleBand1: TQRBand
Left = 38
Top = 38
Width = 718
Height = 40
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
AlignToBottom = False
Color = clWhite
ForceNewColumn = False
ForceNewPage = False
Size.Values = (
105.833333333333
1899.70833333333)
BandType = rbTitle
object QRLabel1: TQRLabel
Left = 88
Top = 16
Width = 58
Height = 17
Frame.Color = clBlack
Frame.DrawTop = False
Frame.DrawBottom = False
Frame.DrawLeft = False
Frame.DrawRight = False
Size.Values = (
44.9791666666667
232.833333333333
42.3333333333333
153.458333333333)
Alignment = taLeftJustify
AlignToBand = False
AutoSize = True
AutoStretch = False
Caption = 'QRLabel1'
Color = clWhite
Transparent = False
WordWrap = True
FontSize = 10
end
end
end
object Button1: TButton
Left = 96
Top = 64
Width = 75
Height = 25
Caption = 'Button1'
TabOrder = 1
OnClick = Button1Click
end
end

 
TO:hfghfghfg
把源碼例子發到我信箱。謝謝! fwcy@sohu.com
這裡還有20分http://www.delphibbs.com/delphibbs/dispq.asp?lid=2245142
 
TO:hfghfghfg
通不過! 把寫好的發我信箱好嗎? fwcy@sohu.com
謝謝!
 
高手,快來幫忙呀!
 
我这个对你肯定有帮助的,我自己用的完整的例子:
楼上说的方法都没错,自定义预览:
还是给你发到邮箱吧……这样好懂些
 
邮件我已经发了
要修改缩放比例直接修改zoom后面的值就可以了
调用方法:
在QuickRep的OnPreview中写下面这段代码:
procedure TFormPrn.QuickRep1Preview(Sender: TObject);
begin
Form_Print:=TForm_Print.Create(Application) ;
with Form_Printdo
begin
Preview.QRPrinter:=QuickRep1.QRPrinter ;
ShowModal ;
Free ;
end ;
end;
呵呵,是不是很简单啊,一定没问题的……
 
TO:hongxing_dl
謝謝你! 我還沒有去看。等會再把分給你!
 
TO:hongxing_dl
沒有項目文件! 運行不了!
我先創建一個項目文件,窗體是form1,再加入一個form2.在form2上加入一個QuickRep,然後再從項目中加入你給我的單元!再在form2的QuickRep的OnPreview寫入你說的上述代碼。再在form1上放一個按鈕。在這個按鈕中寫入form2.QuickRep1.Preview;
可是運行後報表的顯示是灰色的(沒有報表顯示)! 怎麼解決!
請把一個可執行的整個完整項目EMAIL給我! 謝謝!
 
呵呵,只要没报错就好,应该错在这里了:
quickrep里面必须要有可预览的数据才行,把QuickRep的Bands加上,然后再放入几个QRLabel再试试。
如果还不行的话,我可以单独给你做一个放上去
 
顶部