freereport 2.34 的报表设计器.呵..
//-----------------------------------------------
program designrpt;
uses
Sysutils,forms,inifiles,
FR_BarC, FR_Shape, FR_Rich, FR_Desgn, FR_DSet,
FR_DBSet, FR_Class;
var
filenames:string;
mainform:tform;
frReport1: TfrReport;
masterdata,userdata: TfrDBDataSet;
{$R *.RES}
begin
mainform:=tform.Create(nil);
frReport1:=TfrReport.create(mainform);
userdata:=TfrDBDataSet.create(mainform);
userdata.name:='userdata';
masterdata:=TfrDBDataSet.create(mainform);
masterdata.Name:='masterdata';
filenames:=extractfilepath(application.exename)+'design.ini';
if fileexists(filenames) then
begin
with tinifile.Create(filenames)do
try
userdata.Name:=readstring('desgin','dbname1','userdata');
masterdata.name:=readstring('desgin','dbname2','masterdata');
finally
free;
end;
end else
begin
with tinifile.Create(filenames)do
try
writestring('desgin','dbname1','userdata');
writestring('desgin','dbname2','masterdata');
finally
free;
end;
end;
try
frReport1.DesignReport;
finally
userdata.free;
masterdata.free;
frReport1.free;
mainform.free;
end;
end.