Free memory
Hi,
What I would like to know is: if I create components (as dbText,
subreports, ...) dynamicaly, is it imperative to use a custom preview form?
Or, there is another form to free memory of these components?
And... I create components inside a subreport, if I destroy the subreport,
am I destroying the components too?
Thank you very much...
Bruno Nepomuceno
What I would like to know is: if I create components (as dbText,
subreports, ...) dynamicaly, is it imperative to use a custom preview form?
Or, there is another form to free memory of these components?
And... I create components inside a subreport, if I destroy the subreport,
am I destroying the components too?
Thank you very much...
Bruno Nepomuceno
This discussion has been closed.
Comments
for freeing that component when the report is freed.
If you do something like this, then the dbtext will get freed when the
subreport is freed.
...
lSubReport := TppSubReport.Create(Self);
lSubReport.Band := aReport.Detail;
lSubReport.CreateReport(aReport);
lSubReport.Report.CreateDefaultBands;
lSubReport.Report.DataPipeline := ppDBPipeline2;
lDBText := TppDBText.Create(Self);
lDBText.Band := TppBandedReport(lSubReport.Report).Detail;
lDBText.Left := 0.1;
lDBText.Top := 0.0313;
lDBText.Width := 0.625;
lDBText.DataPipeline := ppDBPipeline2;
lDBText.DataField := 'OrderNo';
lDBText.Transparent := True;
lDBText.Font.Name := 'Arial';
lDBText.Font.Size := 10;
lDBText.Font.Style := [];
{frees the dbText}
lSubReport.Free;
...
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com