Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Parsing Components in runtime loaded Report

edited December 2014 in General
hi all,

i search for a code snippet how to get access to all components in a
runtime loaded report.

For example
1. we are loading a report in rumtime
2. in Header Band we have for example a DPTeeChart in HeaderBand
3. i like to have access to this DPTeeChart

i tried:

procedure SetTChartDefaultSettings(Base: TComponent);
var
myEnum: TComponentEnumerator;
i: integer;
begin

for i := 0 to ppReportListenvorschau.HeaderBand.ComponentCount-1 do
begin
ShowMessage(ppReportListenvorschau.HeaderBand.Components[i].ClassName);
end;


if Assigned(Base) then
begin
myEnum:=Base.GetEnumerator;
end
else begin
myEnum := ppReportListenvorschau.GetEnumerator;
end;

while myEnum.MoveNext do
begin
ShowMessage(myEnum.GetCurrent.ClassName);
SetTChartDefaultSettings(myEnum.GetCurrent);
end;
end;


but i did not found any way to get a list of all components placed on
the report like Lable, Shape,DBText, DBTChart,....


we are using Delphi 2007, RP 12.04 Enterprise, TChart Pro V7.12


thanks for help

regards

daniel

--
--
Regards,
Daniel Magin
Embarcadero MVP
www.deltra.de

Comments

This discussion has been closed.