下面是我写的代码,请各位指点一下
procedure Tfrm_report.btPrintClick(Sender: TObject);
// **** 直接打印
var
sReportfile:String;
begin
inherited;
sReportfile:= PApp_path+'reports\客户资料.frf';
if FileExists(sReportfile) then begin
frReport1.LoadFromFile(sReportfile);
frReport1.PrepareReport;
frReport1.PrintPreparedReport('', 1, False, frAll); //直接打印
end
else begin
Application.MessageBox('没有这个文件,可能报表文件已丢失!','提示信息',MB_OK);
Exit;
end;
end;
这样试也是先直接打印一次,再跳出打印对话框,按确定就会再次打印,当然取消就不打印
能不能直接打印一份后,不再跳出打印对话框,谢谢
不好意思,我的分数不多了
procedure Tfrm_report.btPrintClick(Sender: TObject);
// **** 直接打印
var
sReportfile:String;
begin
inherited;
sReportfile:= PApp_path+'reports\客户资料.frf';
if FileExists(sReportfile) then begin
frReport1.LoadFromFile(sReportfile);
frReport1.PrepareReport;
frReport1.PrintPreparedReport('', 1, False, frAll); //直接打印
end
else begin
Application.MessageBox('没有这个文件,可能报表文件已丢失!','提示信息',MB_OK);
Exit;
end;
end;
这样试也是先直接打印一次,再跳出打印对话框,按确定就会再次打印,当然取消就不打印
能不能直接打印一份后,不再跳出打印对话框,谢谢
不好意思,我的分数不多了
解决方案 »
- 求教一个窗体设计的问题
- VB代码转化成Delphi
- 100分高求INDY控件中的IDHTTP问题,在线等...........
- 如何较好地在PaintBox上画一个有"粗度"的点?
- delphi的精髓是什么??
- 文件拷贝:用CopyFile拷贝多个文件,在拷贝之前,如何估计拷贝所用的时间?
- $ 300 -- 有没有人用过条形码打印控件TBarCode ? 他一定要有Delphi 开着才能运行(未注册!)
- 用CreatOleObject创建ADODB对象进行数据库编程的大虾请进。
- 请教大家,从a到z循环如何写!
- 对不起,一个与编程无关的问题。
- FastReport 问题!请各位指教!多谢
- fastreport的使用之,不用预览,直接打印
frReport.Preview=nil;
frReport.SavePreparedReport('*.frf');//随便取个名字存一下
if frReport.PrepareReport then
frReport.PrintPreparedReport('',1,false,frAll);
frReport.ShowPrinfDialog:=False;2.运行一下代码
frReport1.PrepareReport;
frReport1.ShowPreparedReport
这样就不显示了