📄 rpt4.dpr
字号:
library rpt4;
{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }
uses
SysUtils,
Classes,
dbtables,
Windows,
uRpt4 in 'uRpt4.pas',
uXls in 'uXls.pas';
{$R *.RES}
procedure ProcRelease(Reason : integer);
begin
//if Reason=DLL_PROCESS_DETACH then
// XLS_Close;
end;
procedure CreateReport_4;
begin
u4_db := TDatabase.Create(nil);
with u4_db do
begin
AliasName := 'HZ_BS';
DatabaseName :='HZ_BS';
Params.Clear;
Params.Add('USER NAME=hzdba');
Params.Add('PASSWORD=project');
KeepConnection := True;
LoginPrompt := False;
Connected := True;
end;
u4_qryAF := TQuery.Create(nil);
u4_qryAF.DatabaseName := 'HZ_BS';
u4_Init_Attr;
XLS_Create;
XLS_SetWorkSheetFontSize('宋体',10);
u4_DrawFrame;
u4_FillTable;
u4_FillTable2;
XLS_Show;
end;
procedure FreeReport_4;
begin
u4_db.Connected := False;
u4_db.Destroy;
end;
exports
CreateReport_4,
FreeReport_4;
begin
DllProc := @ProcRelease;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -