I don't see a way to get the Report to recognize 
array elements in the report design.

But if your purpose is to be able to manipulate groups
of labels using an index you can use the following
shameless hack.

Adopt some naming scheme to identify the indexed labels
- say for example that the _n suffix will denote the
labels[n].

So now - at design time you put labels on your report
with names like mylabel_0  mylabel_1 etc

Then create a readonly property to the form that hosts 
the report

function GetMyLabel(Index:Integer): TQRLabel;
property MyLabels[Index: Integer]: TQRLabel read GetMyLabel; default;

function GetMyLabel(Index:Integer):TQRLabel;
begin
      // in production probably should do some error checking ...
    return FindComponent(format('mylabel_%d',[Index]);
end;
    

Now you can do stuff like 

for i:=0 until 9 do mylabels[i].caption:='foo';


i'm making this up as i write this so caveat emptor - it
may not even compile, and i certainly haven't tested it.

-Ns



----- Original Message ----- 
From: "Mark Howard" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Friday, October 12, 2001 2:08 AM
Subject: [DUG]: Array of labels in QR


Hi
Is it possible to use an array of QRLabels in a Quick Report?

If so, 

Is it possible to to create and place these at design time?

and the next question (design time or run time) would be 

"How"?

TIA

Mark






---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to