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

ControlCount

edited March 2003 in General
Is there any property that I can access similar to Controls/ControlCount
that will allow me to iterate through all report builder controls so
that I can change the controls on the fly?

thanks,

Duane

Comments

  • edited March 2003
    Hi Duane,

    here an example ...


    procedure TmyEndUserSolution.ChangeGraphicType(aReport: TppCustomReport);
    var
    liBand: Integer;
    liObject: Integer;
    lObject: TppComponent;
    begin

    for liBand := 0 to aReport.BandCount-1 do
    begin

    for liObject := 0 to aReport.Bands[liBand].ObjectCount-1 do
    begin
    lObject := aReport.Bands[liBand].Objects[liObject];

    if (lObject is TppSubreport) then
    ChangeGraphicType(TppSubreport(lObject).Report)

    else if (lObject is TppDBImage) then
    TppDBImage(lObject).GraphicType := 'JPEG';

    end;
    end;
    end;



    regards,
    Chris Ueberall;
  • edited March 2003
    I found it - Objects/ObjectCount.

This discussion has been closed.