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

Iterate report and subreport

Hi,
what am I doing wrong here?

procedure TransalateReport(Report: TppCustomReport; Sprak: integer);
var
liBand : Integer;
liObject : Integer;
lObject : TppComponent;
begin
for liBand := 0 to Report.BandCount-1 do
begin
for liObject := 0 to Report.Bands[liBand].ObjectCount-1 do
begin
lObject := Report.Bands[liBand].Objects[liObject];
if lObject is TppSubreport then
TransalateReport(lObject.Report, Sprak)
else
begin
// Handle my Object here
end;
end;
end;
end;

Comments

  • Hi,
    found it my self.

    if lObject is TppSubreport then
    with lObject as TppSubreport do

    Sorry for this post.
    Dag
Sign In or Register to comment.