ClientDataset descendant

edited 11:46AM in FastReport 4.0
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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.