pubreport.pas
来自「一个电力企业的后台管理程序」· PAS 代码 · 共 49 行
PAS
49 行
unit pubReport;
interface
uses rbReport_Interface,Sysutils,Dialogs ;
procedure PreviewReport(ARptName,ASQLText,ADetailSQLText,ASubDetailSQLText,ACaption:string);
procedure DesignReport(ARptName,ASQLText,ADetailSQLText,ASubDetailSQLText,ACaption:string);
implementation
procedure PreviewReport(ARptName,ASQLText,ADetailSQLText,ASubDetailSQLText,ACaption:string);
var
rep:TrbReport_Interface;
begin
rep := TrbReport_Interface.Create(nil);
try
rep.DBName:='DBECSC';
rep.ModalPreview:=true;
rep.AutoData:=true;
rep.TemplateName:='REPORTMOD\'+ARptName+'.rtm';
rep.SQLText :=ASQLText;
rep.DetailSQLText :=ADetailSQLText;
rep.SubDetailSQLText :=ASubDetailSQLText;
rep.RptCaption :=ACaption;
rep.Preview;
finally
rep.Free;
end;
end;
procedure DesignReport(ARptName,ASQLText,ADetailSQLText,ASubDetailSQLText,ACaption:string);
var
rep:TrbReport_Interface;
begin
rep := TrbReport_Interface.Create(nil);
try
rep.DBName:='DBECSC';
rep.ModalDesign:=true;
rep.AutoData:=true;
rep.TemplateName :='REPORTMOD\'+ARptName+'.rtm';
rep.SQLText :=ASQLText;
rep.DetailSQLText :=ADetailSQLText;
rep.SubDetailSQLText :=ASubDetailSQLText;
rep.RptCaption :=ACaption;
rep.Design;
finally
rep.Free;
end;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?