ClientDataset descendant
I would like to create a TClientDataset descendant to be used on report scripts. So, it would be TfrxClientDataset.
I need create that dataset which doesn??t have Database or SQL properties but needs to have its own fields and be populated at run time and needs to be connected to a masterdata, so it needs to be TfrxDataset
I need do something like ...
procedure Report.OnStartReport(Sender: TComponent);
begin
cds:= TfrxCientDataset.Create(Report);
cds.FieldDefs.Add('Name',ftString,50,False);
cds.FieldDefs.Add('Value',ftFloat,0,False);
cds.FieldDefs.Add('Obs',ftMemo,0,False);
cds.IndexDefs.Clear;
cds.IndexDefs.Add('Name','Name',[ixPrimary,ixCaseInsensitive]);
cds.IndexName := 'Name';
cds.CreateDataSet;
cds.InsertRecord();
cds.InsertRecord();
cds.InsertRecord();
//then assign a master band to that Dataset
MasterData1.Dataset:=cds;
end
The main of this is just have a Dataset which can insert, delete, index records
I need create that dataset which doesn??t have Database or SQL properties but needs to have its own fields and be populated at run time and needs to be connected to a masterdata, so it needs to be TfrxDataset
I need do something like ...
procedure Report.OnStartReport(Sender: TComponent);
begin
cds:= TfrxCientDataset.Create(Report);
cds.FieldDefs.Add('Name',ftString,50,False);
cds.FieldDefs.Add('Value',ftFloat,0,False);
cds.FieldDefs.Add('Obs',ftMemo,0,False);
cds.IndexDefs.Clear;
cds.IndexDefs.Add('Name','Name',[ixPrimary,ixCaseInsensitive]);
cds.IndexName := 'Name';
cds.CreateDataSet;
cds.InsertRecord();
cds.InsertRecord();
cds.InsertRecord();
//then assign a master band to that Dataset
MasterData1.Dataset:=cds;
end
The main of this is just have a Dataset which can insert, delete, index records